DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Macro Multi-Entry Dialog Box

Started by ablincoe, March 10, 2014, 10:58:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ablincoe

I am looking for a way to have my macro (an Unfold based on a Surface Patch/Connect), but need to have the user provide several entries.  I don't want to open a separate box for each input needed as it would become annoying.  Also, the entries are not of the "point definition" type.  Examples of what the macro needs to run successfully are:
     Which layer should the unfolded/flattened object be placed on
     Which preset point within the surface grid should the unfolding process start  (1-10)
          If the above is 10, the user needs to input a starting Line # and Point # to start the decoding on
     Should DesignCAD's choice for Rows/Columns be preserved, or reversed  (1/2)
     Which Plane would you like the output plotted to  (1, 2, 3)
     Should the base of the first object be placed on the Vertical or the Horizontal  (1/2)
     Should tracking diagonal lines be inserted into the flattened object on regular intervals (0-??)
     Should tracking perpendicular lines be inserted into the flatted object at regular intervals (0-??)

I would appreciate any ideas as to what people have used for this type of scenario.

Thanks,
Allen

prl

Allen,

I would suggest building the GUI dialog with the OLE SDK and your favorite compiler platform (C++, VB, Delphi) and have it feed the input data to a macro data file.  Then when the user clicks the, say,  "Unfold it" button,  your GUI dialog will execute the RunBasicCAD method in the Document class.

prl

Allen,

Another option if you don't want to go the compiler route is maybe something like AutoHotKey.  It is free.  Here is a you tube link to how to build a GUI.

http://www.youtube.com/watch?v=8GxgVgyzFqI

Bob P

You can also use multiple-value (on one line) responses by separating the arguments using spaces or commas.  It is done using the text manipulation tools within BasicCad.

ablincoe

PRL,  The AutoHotKey thing does look like something promising.  I had also been toying with the idea of putting the variables into an editable - d3i - file that could be "included" in the macro, or just using a text file with the information in it.

Allen