Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Member
doaiena
Posts: 6
Registered: ‎12-19-2012
Message 1 of 11 (405 Views)
Accepted Solution

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

405 Views, 10 Replies
01-07-2013 01:02 PM

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.

Valued Contributor
Rtogores
Posts: 84
Registered: ‎02-07-2001
Message 2 of 11 (380 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-08-2013 09:58 AM 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.

Active Member
doaiena
Posts: 6
Registered: ‎12-19-2012
Message 3 of 11 (375 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-08-2013 10:37 AM 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.

Valued Contributor
marko_ribar
Posts: 93
Registered: ‎12-04-2011
Message 4 of 11 (358 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 05:19 AM 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)
Valued Contributor
marko_ribar
Posts: 93
Registered: ‎12-04-2011
Message 5 of 11 (352 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 05:25 AM 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)
Active Member
doaiena
Posts: 6
Registered: ‎12-19-2012
Message 6 of 11 (349 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 05:34 AM 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.

Valued Contributor
marko_ribar
Posts: 93
Registered: ‎12-04-2011
Message 7 of 11 (343 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 05:50 AM 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)
Active Member
doaiena
Posts: 6
Registered: ‎12-19-2012
Message 8 of 11 (338 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 07:50 AM 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.

Valued Contributor
Rtogores
Posts: 84
Registered: ‎02-07-2001
Message 9 of 11 (333 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 09:30 AM 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.

 

 

Active Member
doaiena
Posts: 6
Registered: ‎12-19-2012
Message 10 of 11 (327 Views)

Re: "_.solidedit" "_face" "_move" on multiple soli

01-09-2013 11:06 AM 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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community