_3D.getGraphic

Syntax

<Path>._3D.getGraphic(GraphicGroupName:string[, Path:any) → any

The method _3D.getGraphic returns the designated graphic of the object designated by <Path>.

Parameters

  • The parameter GraphicGroupName of data type string designates the name of the graphic group.

  • The optional parameter Path of data type any either lists numerical indexes or names. Note that you cannot mix these two types of addressing.

    The numerical indexes are one-based.

    The names are just that, namely names, for example MyName.

    Compare these examples:

    • The expression [] designates the entire graphic group. If you do not specify the parameter, you also access the entire graphic group. If you enter _3D.getGraphic("default", []), you address the graphic group named "default" as a whole.

    • The expression [1] designates the first direct child graphic.

    • The expression ["abc"] designates the direct child graphic with the name abc.

    • The expression [1,4] designates the fourth child graphic of the first direct child graphic.

    • The expression ["abc","def"] designates the child graphic with the name def of the direct child graphic with the name abc.

The figure below illustrates the values of the parameters GraphicGroupName and Path for the displayed nodes of the Frame.

You can view and access the attributes and methods of the graphics and the graphic groups by selecting Edit > Auto Complete in the Method Editor.

Return Value

The return value has the data type any.

Example

var g := Machine._3D.getObject("default", [1])
-- returns the first graphic in the graphic group named default
g.Position := [1,2,3] 

Related Topics

_3D.InheritGraphics

_3D.getObject

graphic

Copy 3D Object Settings to a Method