Name | Description |
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType(). |
deleteMe | Deletes the entity from the custom graphics group. |
getOpacity | Gets the opacity of the graphics entity. |
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material. |
Name | Description |
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated. |
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored. |
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance. |
coordinates | Gets and sets the coordinates used to define the position of the custom graphics points. If no indexList is specified, every coordinate will be drawn using a custom graphics point, |
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered. |
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0. |
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier. |
indexList | An list of indices that specify which coordinates from the coordinate list to draw points for. If this is an empty array, then all of the coordinates are used. |
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable. |
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference. |
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible. |
name | Gets and sets the name displayed when this entity is selected. If no name has been set, "Custom Graphics" will be displayed. |
objectType | This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object. It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType(): |
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups. |
pointImage | Gets and sets the image that will be used to display the point if the point type is a custom image. The image will always be billboarded. The file should be a PNG image and can use transparency. The filename can be a full path or a relative path that is relative to your runtime file. Setting this will automatically set the pointType to UserDefinedCustomGraphicsPointType. This property can also return an empty string in the case where a user defined image point is not being used. |
pointType | Specifies which of the predefined point images to use. Attempting to set this property to UserDefinedCustomGraphicsPointType will fail. To change to a user defined point type you must set use the pointImage property to specify the image to use and this will have the side-effect of changing the value of this property to UserDefinedCustomGraphicsPointType. |
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity. |
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters). |
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters). |