Jump to content

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


Recommended Posts

Posted

Hello guys

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

Posted (edited)

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
Posted

Yes user select objects by ssget after that code do that

Posted

Please answer the other two questions I just added. Thank you.

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted (edited)
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
Posted

Posting images or example dwg's would stop people guessing and you would have your answer straight away.

Posted

HI BIGAL

INDEED IN MY CODE I WANNA COMBINE TWO FOLLOWING

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

Posted

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?

Posted

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

Posted (edited)

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
Posted

Greaaatttttttttttttttt remark

so thanx you send me what i need

appreciate you :)

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...