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

"_.solidedit" "_face" "_move" on multiple solids

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
doaiena
1477 Views, 10 Replies

"_.solidedit" "_face" "_move" on multiple solids

Hello,

 

I am fairly new to autolisp so my knoledge and coding skills very limited to say the least. I went through all autocad commands but cant find one that performs the "_face" "_move" command on multiple solids.

 

I wanted to write my own command but without success so far. As a starting point i used the express tools "MSTRETCH" lsp and tried to edit it so it performs the "_.solidedit" "_face" "_move" command on the selected solids. At the moment its affecting only one solid. Once i specify the base point, it ruins my previous selection and has only one solid selected out of all. And i am basically stuck now with no ideas on what to do.

 

I would be very thankful if i could get some help.

10 REPLIES 10
Message 2 of 11
Rtogores
in reply to: doaiena

Could you explain what are you trying to do? What is the content of your selection sets?

If you have a selection set you can iterate through the entities contained without the need to create a new selection set.

But, how are you trying tp pick the faces?

There may be other alternatives using more reliable tools. For example ActiveX methods exposed for 3DSolid objects.

Maybe your goal may be attained using other objects, like the new MESH entities.

Message 3 of 11
doaiena
in reply to: Rtogores

I am working with furniture. Each module is made by a solid. So a wardrobe for instance is made by 5+ solids. Curently i am resizing the furniture by using the "move faces" on each individual solid. I wanted to make something that would save me some time by doing the command on all the solids in a single operation.

 

I am not sure about the content in the selection set. As i said i am using the mstretch.lsp from the Express tools as a starting point. I just edited the "(command "_.stretch")" to "(command "_.solidedit" "_face" "_move")", but i didnt get the result i expected out of it.

 

I hope this post makes it more clear on what i have done and am trying to achieve.

Thank you for the reply.

Message 4 of 11
marko_ribar
in reply to: doaiena

Have you tried holding ctrl key and picking multiple faces from more solids and then use pick on red grip and doing face-move (stretch)... It'll perform just what you want, though I tried this on A2012 (don't know if earlier versions support this operation)...

 

M.R.

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 5 of 11
marko_ribar
in reply to: marko_ribar

Just tested on A2009 - you have to mark grips to red with shift key after picking faces with ctrl key... It should perform stretch on selected faces...

 

M.R.

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 6 of 11
doaiena
in reply to: marko_ribar

I am using ACAD 2008. I tried witht he grips but didnt get the result i wanted. And i have to stretch them one by one.

 

Edit: Selecting grips with the shift key works on 2008 aswell. But still i dont get the desired result. When i want to stretch a piece of furniture i need to resize only the inner modules, leaving the outside ones unchanged. The outside modules need only to move in the direction of the stretch by the stretch ammount.

Message 7 of 11
marko_ribar
in reply to: doaiena

Now I tried on A2008... It works as well... Just when finished with selecting faces with ctrl and grip them with shift... Then type "MOVE" instead of picking grip and you can then pick 2 new points... It should do face-move operation for that vector you picked with two new points...

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 8 of 11
doaiena
in reply to: marko_ribar

Thank you for all your time spent in helping me Marko. Its much apprehiated.

 

The method you suggested using the grips works like you said. But i still have to select the grips one by one before performing the stretch itself. I was looking for a more "automated" way of doing it. I wanted to do my selelection of solids and then with a single click perform the command, without the need of additional selections of grips. Thats why i wanted to edit the mstretch lsp found in the express tools directory.

Message 9 of 11
Rtogores
in reply to: doaiena

If what you are looking for is a way to create different variations of a design, let's suppose a cabinet, in which certain parameters change, for example height, width, depth, you could prepare an AutoLISP program that lets you input the values for those parameters and automatically creates the 3D model. This may be done using Solids or meshes.

In my book on AutoLISP/Visual LISP I include some examples of this. 

I am attaching the code for one of the examples. This code has been simplified as the original one includes library functions defined in other chapters of the book. The dimensions for this solid are derived from only one length parameter. The other parameter is the insertion point which is the center of the part.

Of course a cabinet would be far simpler, but I believe you can get an idea of what can be achieved this way.

If you are trying only to modify existing drawings the procedure suggested by marko I believe would be the only option, as 3DSolid subentity selection from AutoLISP is not feasible, at least to my knowledge.

 

 

Message 10 of 11
doaiena
in reply to: Rtogores

First of all i want to thank you both for your replies and the time spent on my matter.

 

"3DSolid subentity selection from AutoLISP is not feasible, at least to my knowledge" - this gives an answer to my question.

Message 11 of 11
58baron
in reply to: doaiena

All,

We have a code on our app caledl Vitruvian that includes a code that will stretch multiple solids.  The command is 'SSS'.

 

The code is being uploaded to the ACAD app store soon.

 

If you would like a copy now, contact me at duane.heil@gmail.com and we can talk about how to get you set up.

 

Duane

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

Post to forums  

Autodesk Design & Make Report

”Boost