Skip to content

๐Ÿ–ผ๏ธ CadifyDartImage

The CadifyDartImage function sends a JSON inference request to an external ML service and inserts the generated image directly into an Excel worksheet.

This function is synchronous and compatible with SolidWorks-driven Cadify workflows.


๐Ÿ“Œ What It Does

When you enter this function into a cell, it posts the provided JSON (from CadifyDartJson) to the Dart/Floris or Bodan ML API and places the returned image at the specified location in your worksheet.

๐Ÿงพ Syntax

=CadifyDartImage(ImageId, Endpoint, Json, JsonType, Target, ZOrder, Style, CadifySheetName)

๐Ÿงฎ Parameters

Parameter Description
ImageId Unique name used to identify the generated image shape in Excel. Existing images with the same name are replaced.
Endpoint URL URL of the ML endpoint. If empty and a Floris model is selected, a default Runpod endpoint is used.
JSON input JSON string, typically generated by CadifyDartJson.
JSON export type Type of JSON / ML request:
0 = Bodan
1 = Floris 1B Runpod
2 = Floris 1B Local
3 = Bodan 1B
Target range Excel cell reference (e.g. "B2") indicating the top-left corner of the image.
Z order Absolute Z-order of the inserted image relative to other shapes.
Style Image style control. If set to SUPPRESS or SUPRESS, image generation is skipped.
CadifySheet name Name of the corresponding CadifySheet() function, used for validation.

Parameter: Endpoint
Type: Text
Description:
URL of the ML endpoint that returns a Base64-encoded image or images.
If empty and a Floris model is selected, a default Runpod endpoint is used.

=CadifyDartImage("PreviewImage", "", A2, 1, "B2", 10, "", "MyCadifySheet")

Where cell A2 contains the JSON generated by CadifyDartJson(1, ...).

๐Ÿ” Behavior

  • Synchronously sends the JSON to the selected ML endpoint and waits for a response
  • Inserts the returned image as an Excel picture at the target cell location
  • Automatically removes previously generated images with the same ImageId
  • Uses internal caching to avoid duplicate requests when parameters are unchanged
  • Returns a status message indicating how long the request took in milliseconds

๐Ÿ”’ Notes

  • Multiple ML models are supported; behavior depends on jsonType
  • Requires internet access and a valid API endpoint
  • Temporary image files are created and deleted automatically
  • Target range must resolve to a valid single Excel cell
  • No bounds validation is performed on jsonType