Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

offset & erase all in one button

Status
Not open for further replies.

shadow

Computer
Mar 1, 2001
321
Ok here is a dosie
I am doing a lot of offsets at a given distance and then erasing what I had offset just to use with the trim command so some think like this

Offset line 1" then erase original and trim a line to the new line

So how can I set it so that the original gets erased after the offset I have tried the select command but as we all know offset expects only one object at a time and does not like previous select

What I have tried so far was a button macro like this

^C^Cselect;\;offset;1";p;\;_erase;p;

But because of the fault with the offset command it wont work if anyone has an idea like partial lisp in my macro it would be very much appreciated
if everyone helps everybody the world will be a better place
 
Replies continue below

Recommended for you

hey does anyone think this might work if i create a button to do this

1 create a layer called trim then start the offset command and what ever i offset it putes it on the trim layer then i set it up so that when i start the trim command it selects everything on the trim layer and then when im finished trimming it erases everything on thetrim layer does this make sense if everyone helps everybody the world will be a better place
 
Place the following in a file called OSNTR.LSP

(defun C:OFFSETNTRIM()
(setq oce (getvar "cmdecho"))
(setvar "cmdecho" 1)
(setq a (car (entsel)))
(command "_.offset" pause a pause "")
(entdel a)
(command "_.trim" (entlast)"")
(setvar "cmdecho" oce)
)

Create a button and assign the following macro:

^C^C(if (not C:OFFSETNTRIM)(load "OSNTR")) OFFSETNTRIM


Now ain't that nice.......
 
ok Stiker somethings wrong

Command:
OFFSETNTRIM
Select object:
_.offset
Specify offset distance or [Through] <0'-1 1/2&quot;>:
Select object to offset or <exit>:

if you press enter it cancles the command hmmm

what does it do exactly (or supposed to do) if everyone helps everybody the world will be a better place
 
>Command:
>OFFSETNTRIM
>Select object:
>_.offset
>Specify offset distance or [Through] <0'-1 1/2&quot;>:

At this point you specify the offset distance or just press enter

>Select object to offset or <exit>:

Now select the object to offset

>if you press enter it cancles the command hmmm

The object you offset will now highlight and you will be prompted to trim objects that cross the offset line. Also the original line you offset will be erased.

>what does it do exactly (or supposed to do)

Offset a line you select at a distance you select, then enter the trim command to allow you to trim to it, and erase the original line. (see your first post)

 
they dont highlight for me striker
as soon as i hit enter it canceles out of the command if everyone helps everybody the world will be a better place
 
why not the move command?
turn on ortho -f8
type &quot;m&quot; , select lines, enter
start to drag in direction desired, then type distance and enter. there is no line left to erase! just move the line!
good luck!
 
I have tested the original posted function in R12, R14, A2K, and A2002 with no problems. I cannot understand where you are having a problem.

OFFSETNTRIM
Select object:
Specify offset distance or [Through] <0'-1 1/2&quot;>:

At this point you specify the offset distance or just press enter

Select object to offset or <exit>:

Now select the object to offset, If you press enter the command will quit. You have to select the object to offset AND the direction to offset just as if you had selected the offset command.

Select object to trim:

Now you select the objects that cross the offset object to trim.

I don't think I can explain it any better
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor