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

DYNAMIC BLOCK STRETCH

7 REPLIES 7
Reply
Message 1 of 8
REID7800
1552 Views, 7 Replies

DYNAMIC BLOCK STRETCH

Is there a way to insert a dynamic block and select the stretch grip with lisp. That's all I want to do. I know how to get it to insert but how do I get it to select the object I just inserted and select the stretch grip?
_____

Reid B.
_____
Acad 2015
Architecture 2010
7 REPLIES 7
Message 2 of 8
rogerio_brazil
in reply to: REID7800

One way to select the last inserted object:

{code}
(command "select" (entlast) "")
(sssetfirst nil (ssget "p"))
{code}

I don't know how to select the stretch grip, sorry
Message 3 of 8
REID7800
in reply to: REID7800

Thanks! This helps
_____

Reid B.
_____
Acad 2015
Architecture 2010
Message 4 of 8
rogerio_brazil
in reply to: REID7800

Another way to select:

{code}
(if (not (member "apcom.arx" (arx)))(arxload "acopm.arx"));;Enable the Pselect command
(command "pselect" (entlast) "")
{code}
Message 5 of 8
Andrew_Sumich
in reply to: REID7800

Hey Reid,

 

Did you get a soution to this?

If you did I would apreciate the code as I'm working on the same problem at the momment

 

Cheers

 

Andrew

Message 6 of 8
jhay2009
in reply to: Andrew_Sumich

Check this old post, it helped me:

 

Dynblock via Allen Johnson

Message 7 of 8
TheDarkPrincess
in reply to: REID7800

rather than try to stretch, which could be very dangerous, look at setting the length or other dynamic parameter you intend to change.

 

 

Message 8 of 8
DINGUBOY
in reply to: REID7800

(defun c:1(/ o l) (setq NA(getstring "\n enter name :") pt(getpoint "\n pick :") va(getpoint pt "\n pick a second point :") di(distance pt va) AN(ANGTOS(ANGLE pt va)) ) (command "_.Insert" na pt "1" "" AN) (setq l (LIST(CONS "X" di) ) o (vlax-ename->vla-object (entlast)) ) (foreach a (vlax-safearray->list (vlax-variant-value (vla-GetDynamicBlockProperties o))) (if (setq e (assoc (vla-get-PropertyName a) l)) (vla-put-value a (vlax-make-variant (cdr e) 5)) ) ) )

 

 

 

 

 

 

 

 

TRY THESE PROGRAM AND I ALSO ATTACHED THE DWG FILE CHECK IT

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

Post to forums  

Autodesk Design & Make Report

”Boost