VBA changes entities property when it should change sketch property as a whole.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Without using VBA there are two ways to modify a drawing sketch's lineweight property.
1) Individually, per entity, from inside the sketch.
2) As a whole, per sketch, from outside the sketch.
VBA should allow a macro to be written to use either method.
You might tell me I'm the one making a mistake here, but I think when VBA modifies a sketch as a whole from outside the sketch it is actually overriding the all entities within the sketch. Which isn't how it works without VBA (ref: screen cap above)
The code that should modify the sketch as a whole looks something like this,,,
Dim oDoc As DrawingDocument
Dim oSketch As DrawingSketch
Set oDoc = ThisApplication.ActiveDocument
Set oSketch = oDoc.ActiveSheet.Sketches(oDoc.ActiveSheet.Sketches.Count)
oSketch.LineWeight = 0.0508
,,,,after the code has run & ended,,, if you edit the sketch to inspect the entities within; it changed them individually.