Jump to content

Request Lisp PLEASE!- make line and copy position Y, paste it to position Z


Recommended Posts

Posted

can someone help me make a lisp loop routine to make LINE and copy the Position Y, and paste it as Position Z???

so Position Y and Position Z will be the same?? please???? this would help us a lot!

 

SO:

Start Y = Start Z

End Y = End Z

Sample.dwg

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

  • Stefan BMR

    39

  • ktbjx

    21

  • Tharwat

    2

  • Grrr

    2

Popular Days

Top Posters In This Topic

Posted

Hi,

 

What is the purpose of uploading a drawing with a few lines without showing the final result you are after?

Posted
Hi,

 

What is the purpose of uploading a drawing with a few lines without showing the final result you are after?

i did, you see, Start y and Start Z are the same. and also End y and End Z are the same,

something like that is what we needed, pretty please??

Posted

Upload another drawing showing an example of the final result you looking forward if that is possible.

Posted
Upload another drawing showing an example of the final result you looking forward if that is possible.

 

Here:

all i really need is copy the Start Y, End Y and paste in to be Start Z End Z

as you will see in the DWG, Start Y = Start Z and End Y = End Z

 

example:

Start X: 1935.5987

Start Y: 1234.9632

Start Z: 1234.9632

End X: 1935.5676

End Y: 1237.3441

End Z: 1237.3441

 

Every single line created is like that... so you can see its very time consuming and we are rushing things. i was wondering if i can do it in list routine that every line we make, the Y and Z are the same. in the case our productivity will be faster :) thank you and im sorry for asking too much

Sample2.dwg

Posted

Very simple. Do you want to learn how to do it?

Posted
Very simple. Do you want to learn how to do it?

YES! very much SIR!

Posted

Ok.

 

First, let's make a SelectionSet. Can you write it for me?

Posted
Ok.

 

First, let's make a SelectionSet. Can you write it for me?

And? :D

 

 

Command???

Posted

nope.

 

(setq ss (ssget "_:L" '((0 . "LINE"))))

This will make a selection of editable (not on locked layer) lines. Do you have the lines in your drawing, isn't it?

Posted
nope.

 

(setq ss (ssget "_:L" '((0 . "LINE"))))

This will make a selection of editable (not on locked layer) lines. Do you have the lines in your drawing, isn't it?

 

okay? im trying to understand, but go on :D

Posted

So, do you have the lines on the drawing, or you want to create them by lisp?

 

PS. Please do not edit your post and press F5 to see my posts quicker.

Posted
So, do you have the lines on the drawing, or you want to create them by lisp?

 

PS. Please do not edit your post and press F5 to see my posts quicker.

 

no, I already have the lines on my drawing sir

Posted

ok.

We have the selection set.

We need a counter. This will help us to get each object from selection.

(setq i 0)

Posted
ok.

We have the selection set.

We need a counter. This will help us to get each object from selection.

(setq i 0)

 

ok, but why is it set to 0 sir???

sorry for asking

Posted

No problem. It is because the selection set is based on 0 index. The first element has the index 0, not 1.

Posted

Now we start the iteration using repeat function. But first, we need to know when to stop, so we need to know the number of the objects in selection set. Can you write the code for these tasks?

Posted
No problem. It is because the selection set is based on 0 index. The first element has the index 0, not 1.

owh okay i get it now. go on

Posted

Did you read the post #17?

Can you or not?

Posted
Now we start the iteration using repeat function. But first, we need to know when to stop, so we need to know the number of the objects in selection set. Can you write the code for these tasks?
(while

im sorry if its wrong

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