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.
Quote from: roy_043 on November 17, 2014, 04:51:27 AM
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"?
Quote from: Peter2 on November 17, 2014, 05:59:56 AM
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,
Quote from: Peter2 on November 17, 2014, 05:59:56 AM
Also "on the fly" - at a "on_clicked_event"?
it should work if you use vla-methods instead of commands.
Regards, Fred
Quote from: roy_043 on November 17, 2014, 08:00:00 AM
Yes*, I have just tested this. Let me know if you need any help...
Any code-snippet is appreciated :)
Quote from: Peter2 on November 17, 2014, 09:05:48 AM
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.
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.