Dynamic sketch with array in .idw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm not expecting anyone to have a solution but on the off chance that someone has an idea.. I've actually managed to dig into the API and even figured out how to edit an existing sketch AND how to find all the sketch dimensions on my own, but I'm stumped now.
I am attempting to set up a dynamic sketch in an .idw that I can update via iLogic. I am using the below code to be able to update sketch constraints, however I've discovered that it can't find the parameter used to define the quantity in an array - in my case d20. It find everything except for array parameters which tells me that either I flat out can't access it because .idw sketches are ridiculous, or I'm using the wrong property. However I can't find a property that does work..
I'd appreciate it if you can even just suggest how I might be able to have a dynamic array in a idw sketch. It's looking to me like it's not possible. My last resort is going to be to draw out each variation manually and use layers..
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument Dim oSketch As DrawingSketch For Each oSketch In oDrawDoc.ActiveSheet.Sketches If oSketch.Name = "Sketch1" oSketch.Edit For Each constraintX In oSketch.DimensionConstraints Dim paramX = constraintX.Parameter MsgBox(paramX.Name) If paramX.Name = "d20" paramX._Value = Parameter.Param("MtgQty")._Value End If Next oSketch.Solve() oSketch.ExitEdit() Exit For End If Next