"Blockview" - Display visibility of Dynamic block?

Started by Peter2 · 2014-11-17 11:29 UTC · 8 replies · SMF topic #2199

The "Subject" says it all:

Can "Blockview" display the visibility of a dynamic block?
Not directly I think. But it is possible to create a temporary block, add an insert of the dynamic block to that block definition, set the correct visibility, and display the temporary block in a BlockView.
author=roy_043 link=topic=2199.msg11025#msg11025 date=1416228687 wrote:
Not directly I think. But it is possible to create a temporary block, add an insert of the dynamic block to that block definition, set the correct visibility, and display the temporary block in a BlockView.

Also "on the fly" - at a "on_clicked_event"?
author=Peter2 link=topic=2199.msg11026#msg11026 date=1416232796 wrote:
Also "on the fly" - at a "on_clicked_event"?
Yes*, I have just tested this. Let me know if you need any help.
*Note: I work with BricsCAD.
Hi,
author=Peter2 link=topic=2199.msg11026#msg11026 date=1416232796 wrote:
Also "on the fly" - at a "on_clicked_event"?

it should work if you use vla-methods instead of commands.
Regards, Fred
author=roy_043 link=topic=2199.msg11030#msg11030 date=1416240000 wrote:
Yes*, I have just tested this. Let me know if you need any help...

Any code-snippet is appreciated  :)
author=Peter2 link=topic=2199.msg11033#msg11033 date=1416243948 wrote:
Any code-snippet is appreciated  :)
See the attached .zip file.
The function CreateTmpBlock creates anonymous blocks. These are hidden from the user, but are still present when the drawing is saved. When the drawing is reopened unused anonymous blocks are automatically deleted. If CreateTmpBlock is called many times the file size of the drawing will increase and you may then want to have your application erase them or want to reuse the same anonymous block definition.
Attachments
Note: for AutoCAD you need to add:
(vl-load-com)
Note 2: for AutoCAD you may have to change:
(vla-put-value a propValue)

To:
(vlax-put a 'value propValue)


BricsCAD is a little more flexible here.