List of script commands for smartparts [Gelöst]


So, I'm very glad to see that we, finally, have a good tool for creating intelligent objects, based on a script. Yet, to improve working with this new tool I think that we should have a list of commands with their explanation to see the full potential of this tool.

For now I've answerd mu self this question
I found an xml file in etc\smartparts\ with all the scropt commands.
Here is a pdf with all the script commands of smartparts allplan.

Anhänge (1)

Typ: application/pdf
4030-mal heruntergeladen
Größe: 1,61 MiB

Thank you for sharing this useful summary Haidu. It'll be very helpful as a reference.

Is there a way to array items with a user defined distance along a path that is controlled by a handle? The example is great to get familiar with the functionality of smartparts. It shows a if then function to place one extra item if the geometry is bigger then XX. But i did not figure out if there are functions that would make it possible to control array'ed items..

thanks in regard
Hans

I also would like some samples and background information about using the different commands in practice. I don't quite understand how points of a extrude have to be handled . 'Handle' seems logical.

Who is able to show me a simple extrude example?
Thanks anyway

REF_HANDLES
HANDLE (0,0,0,p1)
HANDLE (3,0,0,p2)
HANDLE (3,2,0,p3)
HANDLE (0,3,0,p4)
EXTRUDE ?????
?

EXTRUDE generates a general prism with its base defined by a polyline in the XY plane; the displacement vector between the bases is (dx, dy, dz). This command is a generalization of the commands PRISM and SOLID_SLAB; the base polyline is not necessarily closed, as the lateral edges are not always perpendicular to the XY plane. Arcs and segments can be defined within the polyline by using additional status code values.
Tipp: The base polyline may include holes, just like PRISM_.

Syntax
EXTRUDE n, dx, dy, dz, mask, x1, y1, s1, ... , xn, yn, sn

Parameters
n (integer): number of polyline nodes
dx, dy, dz (decimal): displacement vector in X, Y and Z direction
mask: controls the existence of the bottom, top and - in the case of an open polyline - side surfaces (see below)
xi, yi (decimal): X and Y coordinates of the polyline nodes
si (boolean): marks the end of the polygon or hole
parameter restrictions: n > 2

Masking
mask = j1 + 2*j2 + 4*j3
with j1, j2, j3 may be 0 or 1
j1 (1): bottom surface is present
j2 (2): top surface is present
j3 (4): side (closing) surface is present

Status Values
-1: marks the end of the enclosing polygon or a hole, and means that the next node will be the first vertex of another hole.

====

Handle

Thanks Haidu ! Following your advise i found another and more structured way to have a look at the Scripting Reference : go to the folder
"C:\ProgramFiles\Nemetschek\Allplan\Hlp\0000\SmartPartsScriptReference"
and open up the
"index.htm".
Or enter the following line directly into the location of your browser :
"file:///C:/Program%20Files/Nemetschek/Allplan/Hlp/0000/SmartPartsScriptReference/index.htm".

This works with Allplan 2014. It's possible that they changed the structuring of directories.

This help is available on line here...
:-)


Great resource! reads perfectly..
But I still miss some example codes that can be build.
(To started with something else than BOX)