01-06-2019
11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-06-2019
11:29 PM
A workaround is found. After rebuilding document and breaking links, sketch entities links are broken properly. Can you please try below iLogic code?
Sub Main()
Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveDocument
Dim oDef As PartComponentDefinition
oDef = oDoc.ComponentDefinition
Call oDoc.Rebuild()
Dim oSketch As Sketch
oSketch = oDef.Sketches.Item("Sketch5")
BreakAllLinks(oSketch)
End Sub
Public Sub BreakAllLinks(sketch As Sketch)
sketch.Edit()
For Each en As SketchEntity In sketch.SketchEntities
en.Reference = False
Next
sketch.ExitEdit()
End Sub
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
