Message 1 of 3
AutoLISP adding multiple atts to a block, but they're all coming in at 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello to all:
I have a lot of blocks that I have to add the same attributes to. I have code that is successfully adding all the atts I need...but they are ALL coming in at 0,0 in the block editor even though I tried to add code for specific insertion points. Here is a snippet from the full code for one attribute:
(foreach blk blks
(setq def (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) blk))
(setq AttObj1
(vla-addattribute def
8
acattributemodelockposition
"ONE OR BOTH SIDES?"
(vlax-3D-point 200 72)
"SYS_DCV_SIDE"
"default"
)
)
I've attached the LISP file and a very simple block that I've been using for testing. Where's my error? Thanks in advance for any help!