08-23-2018
03:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-23-2018
03:15 PM
Is it currently possible to add a sub-assembly into an assembly and then from that top-level assembly run a rule that could use the Components.Add to the sub-assembly?
Something similar to this maybe?
SyntaxEditor Code Snippet
If openDoc.DocumentType = kAssemblyDocumentObject Then For Each docFile In openDoc.AllReferencedDocuments FNamePos = InStrRev(docFile.FullFileName, "\", -1) docFName = Mid(docFile.FullFileName, FNamePos + 1, Len(docFile.FullFileName) - FNamePos) If docFile.IsModifiable = True Then assemblyDoc = openDoc assemblyDef = assemblyDoc.ComponentDefinition Dim componentA = docFile.Components.Add("nozzle 1", "C:\Users\Public\2019\PIPES\PIPEC2-40-8.ipt",
position := Nothing, grounded := True, visible := True,
appearance := Nothing) End If Next End If