Hello vulic,
This code (VBA) synchronize that the sketch lines are construction or not.
Only the lines will be synchronized. If you want to synchronize other entities (circle, eclipse, etc...), please add codes.
Sub SynchronizeDerivedSketchBlock()
Dim oPartDoc As PartDocument: Set oPartDoc = ThisApplication.ActiveDocument
Dim oPartCompDef As PartComponentDefinition: Set oPartCompDef = oPartDoc.ComponentDefinition
' For each Derived Part Component...
Dim oDerivedPartComp As DerivedPartComponent
For Each oDerivedPartComp In oPartCompDef.ReferenceComponents.DerivedPartComponents
' For each Sketch Block Definition...
Dim oSktBlkDef As SketchBlockDefinition
For Each oSktBlkDef In oDerivedPartComp.SketchBlockDefinitions
Dim oOriginalSktBlkDef As SketchBlockDefinition
Set oOriginalSktBlkDef = oSktBlkDef.ReferencedEntity
' For each Sketch Line...
Dim i As Integer
For i = 1 To oOriginalSktBlkDef.SketchLines.Count
oSktBlkDef.SketchLines(i).Construction = oOriginalSktBlkDef.SketchLines(i).Construction
Next i
Next oSktBlkDef
Next oDerivedPartComp
End Sub
And this code must be run by yourself. I think you can rewrite this in iLogic and invoke this method by the event when the document containing derived part component has been changed.
But if set the event to do so, the code runs at every time when the document is changed. This may cause perfomance problem.
I hope this post will help you.
=====
Freeradical
Hideo Yamada