get xy coordinates of insertion point of blocks into attributes

Nov 30, 2005 2 Replies

I need a LSP that will get (without picking the block) the insertion point of all blocks already inserted into a drawing with the block names "SCP_IN" or "SCP_OUT" and store the insertion point x,y coordinates in an attribute named CORDS of each block.



Can any of you help with this? Thanks! snipped-for-privacy@akerkvaerner.com



Actually it represents a good opportunity to explore writing a bit of LISP for yourself.

(setq ss (ssget "x" '((0 . "INSERT")))) will make a selection set of all of the blocks in your drawing; then it's just a matter of stepping through the selection set, extracting the block name (DXF group 2) and insertion point (DXF group 10), then exporting to a file of your choice. ___

Try this website. They do make good lisps. And there ar esome free downloadables too.

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required