eastar
Industrial
- Oct 12, 2002
- 4
How could I access a part of subassembly from assembly document via VB?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim objApp As Object
Dim objParts As SolidEdgeAssembly.Occurrences
Dim objDoc As SolidEdgeAssembly.AssemblyDocument
Dim objPart As SolidEdgeAssembly.Occurrence
' Connect to a running instance of Solid Edge.
Set objApp = GetObject(, "SolidEdge.Application")
If GetActive = True Then
Set objDoc = objApp.ActiveDocument
Else
Set objDoc = ActiveDoc
End If
Set objParts = objDoc.Occurrences
For Each objPart In objParts
Dim FileName As String
FileName = objPart.OccurrenceFileName
Next
Dim objApp As Object
Dim objParts As SolidEdgeAssembly.Occurrences
Dim objDoc As SolidEdgeAssembly.AssemblyDocument
Dim objPart As SolidEdgeAssembly.Occurrence
Dim objDocSubAss As SolidEdgeAssembly.AssemblyDocument
Dim objPartsSubAss As SolidEdgeAssembly.Occurrences
Dim objPartSubAss As SolidEdgeAssembly.Occurrence
' Connect to a running instance of Solid Edge.
Set objApp = GetObject(, "SolidEdge.Application")
If GetActive = True Then
Set objDoc = objApp.ActiveDocument
Else
Set objDoc = ActiveDoc
End If
Set objParts = objDoc.Occurrences
For Each objPart In objParts
Set objDocSubAss = objPart.OccurrenceDocument
Set objPartsSubAss = objPartSubAss.Occurrences
For Each objPartSubAss In objPartsSubAss
...
Next
Next