08-09-2024
02:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-09-2024
02:11 AM
I recommend you to create external iLogic script which:
- create new assembly
- create new part
- place the part to the assembly
- start editing the part
The script can looks like this
Dim asmTemplate As String = "" 'Add your assembly template here (keep empty for default)
Dim partTemplate As String = "" 'Add your part template here (keep empty for default)
Dim asm As AssemblyDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kAssemblyDocumentObject, asmTemplate)
Dim part As PartDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kPartDocumentObject, partTemplate, False)
Dim partOccurrence As ComponentOccurrence = asm.ComponentDefinition.Occurrences.AddByComponentDefinition(part.ComponentDefinition, ThisApplication.TransientGeometry.CreateMatrix())
part.ReleaseReference()
partOccurrence.Edit()