Hi,
There are some very good examples here:
http://forum.punchcad.co...sts&t=5679#post18087Moreover an export macro has been added to V14, but it only supports circles, arcs, lines, splines and text. Unfortunately is "Point" not supported (Feature Request!).
Everything below is just my observations and should be considered as a guess (no/obsolete documentation):
the macros can be used in two ways.
1) 2D drawings (see the syntax below)
2) Making 3D objects from 2D drawings with Extrude and Revolve (probably also Sweep) and boolean operations. It seems the Extrude and Revolve (and maybe Sweep) creates an objectID that can then be used for Move and Rotate operations Unfortunately is there no Copy/Clone (Feature Request!) command. When using boolean operations the first listed objectID is keept as and objectID for the combined object.
I cannot get the #Sphere, #Cone, #Box, #Cylinder commands to work. I can make a sphere with a diameter of eg. 10mm but I can not get the position to work. Moreover I assume the created 3D object get an objectID so it can be referenced by other commands but it did not seem to work this way or I did it wrong...
When you export drawing as a macro it writes the macro syntax in the beginning of the file. See below. It is very important that "Keep_Constructions, True" is in the file otherwise the lines will not show up and be deleted because they are assumed to be construction lines" for Extrude and commands.
The syntax for macro import seems to be the simple macro language described in the SharkCAD user manual plus the new commands listed below although not all spline types that can be exported seems to be imported (not implemented/sw bug?).
units in the macrofile seems to be inches
Try starting wit a drawing with a simple line and use the export macro function, see example below.
Note the comma between the command and the first parameter. If omitted the command will not work.
kind regards
Danny
A macro file export of a single line.
:
//Geometry Formats Supported for Macro
// Circle, centerX, centerY, centerZ, radius
// Arc, centerX, centerY, centerZ, radius, startAngle, endAngle
// Line, p1.x, p1.y, p1.z, p2.x, p2.y, p2.z
// Interopolate Spline, point number, pt.x, pt.y, pt.z
// Bezier Spline, point number, pt.x, pt.y, pt.z
// Control Point Spline, point number, pt.x, pt.y, pt.z
// Interopolate Spline, point number, pt.x, pt.y, pt.z
// Text, pt.x, pt.y, pt.z, text string:
//
Keep_Constructions, True
#Line, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0
Edited by user Sunday, October 15, 2023 2:56:24 AM(UTC)
| Reason: added missing word and missing copy/clone, added comment about comma, added not all spline types