Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Dynamic Block Property "Scale Uniformly" Automatically

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
1595 Views, 4 Replies

Change Dynamic Block Property "Scale Uniformly" Automatically

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

4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

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))
  )

 

 

Message 3 of 5
msarqui
in reply to: Anonymous

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))
)
)

Message 4 of 5
pbejse
in reply to: msarqui


@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 ()
....)

 

 

Message 5 of 5
msarqui
in reply to: pbejse

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!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost