PDA

View Full Version : Knowing blocks insertion units


l3ch
2009-03-24, 08:16 PM
Hi!

We have in many drawings blocks inserted with VBA which have not insertion units, and blocks inserted manually or by lisp, which, as expected, have insertion units.

I need to know by lisp if the block (which can or cannot be inserted, but it exist in the blocks table) has been defined with or without insertion units.

Any idea?

'gile'
2009-03-24, 11:34 PM
Hi,

You can get the Units property of the block definition (0 means none unit)

BlockName = the block name

(vla-get-Units
(vla-item
(vla-get-Blocks
(vla-get-ActiveDocument (vlax-get-acad-object))
)
BlockName
)
)

l3ch
2009-03-25, 10:30 AM
Great! It woks!!!!


Thank you very much,