Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have a Assembly whit some Sub Assemblys in.
Because I use Vault and I have to change the name of Assembly when I do copy design, I use this: in Assembly
Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oDef As AssemblyComponentDefinition oDef = oDoc.ComponentDefinition Dim oSilo1 As ComponentOccurrence = oDef.Occurrences.Item(1) Dim oSilo2 As ComponentOccurrence = oDef.Occurrences.Item(2) Dim oSilo3 As ComponentOccurrence = oDef.Occurrences.Item(3) Dim oSilo4 As ComponentOccurrence = oDef.Occurrences.Item(4) Dim oSilo5 As ComponentOccurrence = oDef.Occurrences.Item(5) Dim oSilo6 As ComponentOccurrence = oDef.Occurrences.Item(6) Dim oSilo7 As ComponentOccurrence = oDef.Occurrences.Item(7) Dim oSilo8 As ComponentOccurrence = oDef.Occurrences.Item(8) Dim oSilo9 As ComponentOccurrence = oDef.Occurrences.Item(9) Dim oSilo10 As ComponentOccurrence = oDef.Occurrences.Item(10) Dim oSilo11 As ComponentOccurrence = oDef.Occurrences.Item(11) Dim oSilo12 As ComponentOccurrence = oDef.Occurrences.Item(12)
and this in Sub Assembly:
Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oDef As AssemblyComponentDefinition oDef = oDoc.ComponentDefinition Dim oFoundation As ComponentOccurrence = oDef.Occurrences.Item(1) Dim oSilo As ComponentOccurrence = oDef.Occurrences.Item(2) Dim oConv As ComponentOccurrence = oDef.Occurrences.Item(3)
It is ok is work ok but I have a problem when I want to call a part from Sub Assembly
I don't know how the code should be.
like this is not working:......
If SUPRESS_SILO="Yes" Then Component.IsActive(MakePath(oSilo1.Name, oSilo.Name))=True End If
Somebody know how this rule shout be?
Many Thanks!
Solved! Go to Solution.