Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I can' select edgeproxy from subassmelby. I need it to make constraint. Anyone know why I can't do it?
Public Sub SelectEdgeFromSub()
Dim oAsmCompDef As AssemblyComponentDefinition
Set oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oComponentOccurrence As ComponentOccurrence
Set oComponentOccurrence = ThisApplication.CommandManager.Pick(kAssemblyOccurrenceFilter, "Wybierz element, który chcesz zwiazac")
Dim oSubAssembly As ComponentOccurrence
Set oSubAssembly = oComponentOccurrence.Definition.Occurrences.Item(1)
Dim oSurfaceBody As SurfaceBody
Set oSurfaceBody = oSubAssembly.Definition.SurfaceBodies.Item(1)
Dim oEdge As Edge
Set oEdge = oSurfaceBody.Edges.Item(1)
Dim oEdgeProxy1 As EdgeProxy
Call oSubAssembly.CreateGeometryProxy(oEdge, oEdgeProxy1)
Dim oSelectSet As SelectSet
Set oSelectSet = ThisApplication.ActiveDocument.SelectSet
Call oSelectSet.Select(oEdgeProxy1) 'error
End Sub
Solved! Go to Solution.