Message 1 of 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys,
I am having a hard day trying to validate if a block has attributes.
I think is something with AcadBlockReference versus AcadBlock but no clue how to solve this.
Could you help me please?
(vlax-for blk (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) ;For each block (if (and (= (vla-get-islayout blk) :vlax-false) ;If it is not the layout itself (= (vla-get-isxref blk) :vlax-false) ;If it is not a xref (vlax-property-available-p vlobj 'HasAttributes) ;If it has attributes );and (vlax-for subent blk ;For each object inside the block (vla-put-layer subent "Defpoints") ;Change its layer (vla-put-color subent 30) ;Change its color );vlax );if );vlax
Thanks,
Marcelo
Solved! Go to Solution.