Jump to content

Recommended Posts

Posted

I've seen offset LISPs, but none that does specifically what I'm looking for. Also, I tried the default offset function with the through setting, but it's not it.

Like the default offset function, I would like one that offsets a line a certain distance in either a positive or negative direction depending on the user selection. However, I would like to go beyond that...
For example, I would select the line I want to offset (line1) and then specify the distance by picking any two points in the drawing (pt2-pt1). Then, I would like to select another point (pt3) to get the next offset distance (pt3-pt1), and so forth. After or during selection, the function would offset the original line (line1) with the specified distances.

Please help, thanks!

Posted

as long as the points you click are on the same direction as you want it to offset.. wouldnt that just be the nomal copy command?

But yes, when the direction doesnt match copy wouldnt work

Posted (edited)

Are you able to make a LISP to do all the selections, select a line, select point 1 and then a loop to select the subsequent points, working out the distances?

 

If you use vla-offset you can specify direction with a =ve or -ve distance for example

 

(vla-Offset (vlax-ename->vla-object (car (entsel))) 1000)

will go one way 1000 units

 

(vla-Offset (vlax-ename->vla-object (car (entsel))) -1000)

will go the other way 1000 units

 

For direction you can use the line end A and angle between that and the point

 

Point end A:

(cdr (assoc 10 (car (entsel))))

 

Angle between the points will be in radians, if radians is less than pi the offset is one direction, if it is more than pi it is the other (I think).. might need to work that one out, might be between pi / 2 and 3x pi / 2 one direction, the other 2 quadrants the other direction. Something like that.

 

 

In the above you can replace (car(entsel)) with a variable and use that through the LISP

 

 

 

There, probably confused you but have a go and see what you can make up

 

 

 

 

EDIT

Actually the angles might be dependent on the lines angle.

 

 

 

BigAl might be about later, his favourite option is to select the line near one end or the other and offset in say a clockwise direction from that point each time

Edited by Steven P
Posted

Here is a recent example - maybe not totally what you are looking for, but similar:

 

 

Posted
8 hours ago, EnM4st3r said:

as long as the points you click are on the same direction as you want it to offset.. wouldnt that just be the nomal copy command?

But yes, when the direction doesnt match copy wouldnt work

Yes, I use it to draw elevations from plans. So from the plans I would get the offset from property line to edge of window or center of column, etc. in the y-direction and then offset the property line in the elevation view to said distance in the x-direction... so far I have been doing it one offset at a time or creating a block to mark my lines and rotating it on elevation view.

Posted
2 hours ago, pkenewell said:

Here is a recent example - maybe not totally what you are looking for, but similar:

 

 

 

This could be helpful if I would figure out a way to make a list of strings that gets the distance btwn a set of points. Can you help me write one or know of a similar code?

Thanks!

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