Skip to main content

ACP in-app scripting API 2026 R1

VirtualGeometry

Last update: 16.07.2026

class compolyx.VirtualGeometry(graph, obj, parent=None)

Represents a VirtualGeometry.

Attributes

Name Description
VirtualGeometry.active Active status of the object.
VirtualGeometry.cad_geometry Returns the linked CADGeometry.
VirtualGeometry.cad_references Dictionary of all CAD references.
VirtualGeometry.dimension Highest dimension of all CAD references.
VirtualGeometry.enabled Indicates whether the object is enabled.
VirtualGeometry.id ID of the object.
VirtualGeometry.is_dict_item Indicates whether the object is an item in a dictionary.
VirtualGeometry.is_list_item Indicates whether the object is an item of a list.
VirtualGeometry.link_path Root path of the current node in the tree for links to this object.
VirtualGeometry.name Name of the object.
VirtualGeometry.parent Parent object in the tree.
VirtualGeometry.root_path Root path of the current node in the tree.
VirtualGeometry.status Status of the object.
VirtualGeometry.status_changed Boolean flag which is set to true in C++ when up-to-date status of object changes.
VirtualGeometry.sub_shapes Sub components of the VirtualGeometry.
VirtualGeometry.uid UID of the object.
VirtualGeometry.vertex Raises an error if the object has been removed from the graph.

Methods

Name Description
VirtualGeometry.add(shape) Creates a new CADReference object for the given shape.
VirtualGeometry.clear_cad_references() Clear all linked references (VirtualGeometry becomes empty).
VirtualGeometry.create_cad_reference([name, ...]) Creates a new CAD reference and links it with the virtual geometry.
VirtualGeometry.find_parent(type) Steps up the tree and returns the first parent with given type.
VirtualGeometry.get_short_description()
VirtualGeometry.obj_exists() Checks if __obj still references the c++ object (has not been reset to None by self._delete) and exists in the graph.
VirtualGeometry.remove(shape) Removes the CADReference object for the given shape.
VirtualGeometry.serialize() Serialize to Python string.
VirtualGeometry.serialize_name_and_id() Serializes the name and ID.
VirtualGeometry.set(shapes) Clears the existing CAD references and creates a new one for each given shape.
VirtualGeometry.update()
VirtualGeometry.visit(visitor) Walk through the tree and let the visitor perform action on every descendant node.

Connect with Ansys