×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

offset & erase all in one button

offset & erase all in one button

offset & erase all in one button

(OP)
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

RE: offset & erase all in one button

(OP)
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

RE: offset & erase all in one button

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

RE: offset & erase all in one button

(OP)
ok Stiker somethings wrong

Command:
OFFSETNTRIM
Select object:
_.offset
Specify offset distance or [Through] <0'-1 1/2">:
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

RE: offset & erase all in one button

>Command:
>OFFSETNTRIM
>Select object:
>_.offset
>Specify offset distance or [Through] <0'-1 1/2">:

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)

RE: offset & erase all in one button

(OP)
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

RE: offset & erase all in one button

why not the move command?
turn on ortho -f8
type "m" ,  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!

RE: offset & erase all in one button

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">:

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources