Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Change Dynamic Block Property "Scale Uniformly" Automatica lly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
G'day,
Been trying to figure out how to change the Scale Uniformly property in dynamic blocks accross hundreds of drawings using either/or scripts, lisp, vba or anything else that might do the job.
WIth my limited knowledge of programming im wondering if there is someone out there that may be able to help me out?
just need to open the drawing and select the block (one block per drawing) then edit the scale uniformly property within the block, save then close the drawing and move onto the next drawing.
Thank you in advance for your help with this matter.
Jason
Solved! Go to Solution.
Re: Change Dynamic Block Property "Scale Uniformly" Automatica lly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
see if this helps... no error control
(setq obj (vlax-ename->vla-object (car (entsel)))
blknm (vlax-get obj 'Effectivename)
)
(vlax-for blk (vla-get-blocks
(vla-get-ActiveDocument
(vlax-get-acad-object)))
(if (eq blknm (vla-get-Name blk))
(vlax-put blk 'BlockScaling acUniform))
)
Re: Change Dynamic Block Property "Scale Uniformly" Automatica lly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
Sorry for the question but: How I use it?
I tred this but I get an error when autocad starts...
(Defund c:BUS ()
(setq obj (vlax-ename->vla-object (car (entsel)))
blknm (vlax-get obj 'Effectivename)
)
(vlax-for blk (vla-get-blocks
(vla-get-ActiveDocument
(vlax-get-acad-object)))
(if (eq blknm (vla-get-Name blk))
(vlax-put blk 'BlockScaling acUniform))
)
)
Re: Change Dynamic Block Property "Scale Uniformly" Automatica lly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
msarqui wrote:Hi,
Sorry for the question but: How I use it?
I tred this but I get an error when autocad starts...
(Defund c:BUS ()
......
(Defun c:BUS ()
....)
Re: Change Dynamic Block Property "Scale Uniformly" Automatica lly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
hahaha. I guess I was tired...
Now it works fine but only one block at a time. I mean, it does not change automaticaly nested blocks. Also it does not accept "select all". I think I'll try to find another one ![]()
Thanks pbejse!
