Jump to content

I need lisp code for selected object change line weight and move them !!


hosyn

Recommended Posts

Hello guys

I need lisp code fierst select objects (ssget code ) and change lineweight to 0.05 and move them to layer yy .??:cry:

Link to comment
Share on other sites

The user will be picking the objects themselves and not relying on the code to automatically pick the objects is that correct?

 

Will the object(s) always be moved to layer "0"?

 

Will the lineweight always be 0.05?

Edited by ReMark
Link to comment
Share on other sites

This doesn't sound like you need a LISP routine to accomplish. Using Qselect or FILTER tools can aid in the selection process, then a couple more clicks for Lineweight and Layer management.

Link to comment
Share on other sites

I too was going to suggest the same thing but lately it seems people have a fondness for not wanting to use features already native to AutoCAD.

Link to comment
Share on other sites

This requst just a part of my lisp file

1_ we select objects

after running code lisp

all of objects change lineweight and layer in specifiec value

 

I wanna do it by one commandd by lisp

Link to comment
Share on other sites

You will still have to specify lineweight and layer in the routine (sub-prompt or otherwise) so again I don't see the absolute need for a LISP routine. But obviously a routine can save one or two steps.

Link to comment
Share on other sites

This requst just a part of my lisp file

1_ we select objects

after running code lisp

all of objects change lineweight and layer in specifiec value

 

I wanna do it by one commandd by lisp

 

So, the layer and the lineweight could change from drawing to drawing correct?

 

Without the benefit of an answer to the question we cannot proceed any further.

Edited by ReMark
Link to comment
Share on other sites

HI BIGAL

INDEED IN MY CODE I WANNA COMBINE TWO FOLLOWING

(DEFUN C:SSER()
(command "_SELECTSIMILAR")
(command "_ERASE" "" )
)

Link to comment
Share on other sites

That wasn't the question you originally asked. Let me refresh your memory. "I need lisp code fierst select objects (ssget code ) and change lineweight to 0.05 and move them to layer yy .??" How about you give us the information we've asked for to complete the first task BEFORE we move on to the next task?

Link to comment
Share on other sites

I must be crazy.

 

Download the attached lisp routine I named DelSim.lsp (for delete similar). I did not write this lisp but I did amend it to include the author's name, the location where it was first posted and the date it was posted. Please leave that information intact. The author decided to invoke the program using the letters JJE. I have no idea why that was but I did not change it.

 

DelSim.lsp

Link to comment
Share on other sites

Either I'm feeling generous or I am just plain stupid. I'm going with the latter.

 

A very rough lisp routine that will 1) change selected objects to layer "0" and 2) change their lineweight to 0.9mm. Feel free to edit it to meet your needs. To run the program load ChgLyrWght.lsp and type the word "test" to run it.

 

ChgLyrWght.lsp

 

In the future it would be most helpful if you answered our questions as completely as possible. We can't help you if you do not provide us with the requested information. Do you understand?

 

One last thing. Everything you asked about, in one way, shape or form was found with a simple Internet search.

Edited by ReMark
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...