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

Need Help with Stretch Solid Lisp

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
448 Views, 6 Replies

Need Help with Stretch Solid Lisp

I wrote a little lisp to stretch solids but at the end I need to hit enter
twice. Is there anyway around this?
Here is what I have:

(defun c:SS (/ OBJ)
(setvar "cmdecho" 0)
(setq OBJ (entsel "\nSelect Solid:"))
(command "DRAWORDER" "SI" OBJ "front" "solidedit" "face" "move" "C")
(princ)
)
6 REPLIES 6
Message 2 of 7
tom.johnson
in reply to: Anonymous

Try this (I'm no guru! there's probably a better way)

 

(command "DRAWORDER" "SI" OBJ "front" "solidedit" "face" "move" pause "" pause pause "X" "")

Message 3 of 7
tom.johnson
in reply to: tom.johnson

PS

I had to leave cmdecho = 1

 

Message 4 of 7
scot-65
in reply to: Anonymous

Be careful here - you did not test if user selected a solid before executing the command.

(if (and (setq a (entsel)) (= (cdr(assoc 0 (entget (car a)))) "SOLID") );and
(progn
[all code here]
);progn
(alert "A SOLID was not selected. ")
);if

It is my experience that in most cases the boundary of a solid is against another entity, however there is a built-in diagonal inside the solid to select from, but finding that diagonal is tricky.
The user will more than likely select an object that is not a solid, or nothing at all, to which your program will crash and cmdecho remains off.

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 5 of 7
tom.johnson
in reply to: scot-65

Thanks! That was my first post ever. I noticed the date Jason posted his question was 01-12-2006 so I didn't expect a comment so soon or really at all. The only change I made to your code was changed "SOLID" to "3DSOLID". Again, thanks!

Thomas C. Johnson
Lead Senior Civil/Structural Designer
My Desk Phone 281-206-6379
My Cell Phone 979-716-9848
[Description: image001[1]]


________________________________

This email and any files attached to it contain confidential information. Please notify the sender if you have received this email in error. If you are not the intended recipient, any use or disclosure of this email or any attached files is prohibited.
Message 6 of 7
scot-65
in reply to: tom.johnson

College Station and Houston area, huh?

I recognize the area codes.

 

I forgot to realize that highlight will help in selecting the object.

I'm old school and have this particular annoying setting disabled.

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 7 of 7
tom.johnson
in reply to: scot-65

Actually, Sealy. I work in Park Ten.

Thomas C. Johnson
Lead Senior Civil/Structural Designer
My Desk Phone 281-206-6379
My Cell Phone 979-716-9848
[Description: image001[1]]


________________________________

This email and any files attached to it contain confidential information. Please notify the sender if you have received this email in error. If you are not the intended recipient, any use or disclosure of this email or any attached files is prohibited.

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

Post to forums  

Autodesk Design & Make Report

”Boost