[quote user="Maxim Kulikov"]
If myEnum.Current.IsComplexShapeElement Then Dim ee As ElementEnumerator Set ee = myEnum.Current.AsComplexShapeElement.GetSubElements While ee.MoveNext ... Loop EndIf
[/quote]
Be more descriptive with your variable names — the right names tell a better story:
If myEnum.Current.IsComplexShapeElement Then Dim components As ElementEnumerator Set components = myEnum.Current.AsComplexShapeElement.GetSubElements While components.MoveNext ... Loop EndIf
Public Function ModifyVertexes(component As Element, PCo() As Point3d, PTm() As Double) As Long
In your ModifyVertexes function, you rewrite the component element. You might try to rewrite the parent of the component (the complex shape) after modifying its component:
Set oParent = myEnum.Current Modify = ModifyVertexes(components.Current, PCo, PTm) If 0 < Modify Then oParent.Rewrite End If
See if that makes any difference.