‎05-06-2018 04:48 PM
I am lost with all the elements defining a path/link.
I want to colorise every line based on an attribute of the object with a VBS Macro.
I can access every MegaDrawingItem representing a line of a path. But I can't find how to access to the object from the repository from there.
Set oDrawing = oDiagram.Drawing("RW") For Each oDItem In oDrawing.DrawingItems If oDItem.DrawClassName = "ModeDrwPath" Then 'Set every path color to red : it works Set oLinePen = oDItem.Pen oLinePen.Color = &hFFFF0000 oDItem.Pen = oLinePen 'My issue is next line. RepositoryObject is always "Nothing" Set oRO = oDItem.RepositoryObject End If Next
Note : I know that you can make custom shapes to solve this issue, but I have to use a VBS script.
Solved! Go to Solution.
‎06-06-2018 08:35 AM
OK... I got it... For each "ModeDrwPath" MegaDrawingItem, there is a "ModeOcc" child.
You can access it via the .SubDrawingItems collection.