v1.5
Adds a point to the new polygon being created.
Note: This command uses output arguments. C# and some
scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference. Normally
you can get the output arguments via either XSIApplication.ExecuteCommand method (C#) or the
ISIVTCollection (scripting languages), but this command
already returns a value.
The only available workaround in this case is to create a VBScript custom command which returns both the output
arguments and the return value in one array. For details, see
What Happens when the Function Already Returns a Value?.
oLong = AddPointToNewPolygon( InputObj, X, Y, Z, [InsertPosition], [PolygonID] ); |
Returns the ID of the newly created point as a Long.
Parameter | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
InputObj | String | Mesh object holding the polygon being built | ||||||
X | Double | X coordinate | ||||||
Y | Double | Y coordinate | ||||||
Z | Double | Z coordinate | ||||||
InsertPosition | Long |
Ordinal of the vertex where to insert the new point in the polygon Default Value: 0
|
||||||
PolygonID | Integer | ID of the polygon affected (-1 is returned if polygon has less than 3 points) |
' Create a triangle dim obj, poly SIGetPrim "EmptyPolygonMesh", , , , obj SelectObj obj ApplyOp "CreatePolygon", obj, siUnspecified AddPointToNewPolygon obj, -2.229, 2.713, 0.000 AddPointToNewPolygon obj, -3.140, -1.686, 0.000 AddPointToNewPolygon obj, 1.744, -2.345, 0.000, , poly SelectObj obj & ".poly[" & poly & "]" |