Method that creates a new occurrence by creating a new external component (X-Ref) that is not saved yet. This is similar to the "New Component" command in the UI when creating an external component, where you specify a name and location but the component is created in-memory without being saved immediately. This allows programs to create and populate an external component without needing to save it first, and makes undo possible. The component will be saved automatically when the parent assembly is saved.
"occurrences_var" is a variable referencing an Occurrences object. |
"occurrences_var" is a variable referencing an Occurrences object. |
| Type | Description |
| Occurrence | Returns the newly created occurrence or null if the creation failed. The component referenced by the occurrence can be edited but is not saved until the parent assembly is saved. |
| Name | Type | Description |
| componentName | string | The name for the new external component. |
| targetFolder | DataFolder | The DataFolder where the component will be saved when the parent assembly is saved. |
| transform | Matrix3D | A transform that defines the location for the new occurrence. |