- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have VBA code that inserts a drawing as a block, consisting of (3) unique blocks, into a drawing. One of the blocks contains a visibility state. If I insert the block from AutoCAD using insert command it works fine - insert, explode into (3) separate blocks, and then I can select the visibility state of the block with the visibility parameter. If I insert the block from my VBA code, the drawing block does get insert into the current drawing, and exploded so the (3) separate blocks are separated - but still each is its own block - however the selector for the visibility states does not show up. Once inserted from VBA, where I can not see the visibility selector, I can go to the block editor and the action parameter is shown and I can change from one state to the other just fine using the selector drop down in the ribbon bar. The visibility parameter properties do show YES for show properties and number of grips is 1.
Another quirk, in my VBA code I select which scale to use when inserting the drawing block. If the scale is 1 then the block comes in fine and I can select the visibility state. Any other scale causes the visibility grip to not show up.
Also, the properties of the block with visibility issues, after inserting from VBA, do not show the "custom" options in the properties where you can select the visibility state.
If I insert the block from VBA, and then insert it from CAD (with or without scaling the CAD inserted block) the one inserted from CAD works. If I edit the block inserted from CAD insert, say draw a line, and save it, the block inserted from VBA, that does not show the visibility options, also updates to show the line I added. But the visibility still does not show up on the VBA inserted block - but the CAD inserted block visibility does work as expected.
Solved! Go to Solution.