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.
Solved! Go to Solution.
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.
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.
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)...
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...
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.
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...
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.
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.
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register