Multiple or stored OFFSET values

Multiple or stored OFFSET values

MarkFitz
Collaborator Collaborator
1,000 Views
7 Replies
Message 1 of 8

Multiple or stored OFFSET values

MarkFitz
Collaborator
Collaborator

Does anyone know of a way I can "store" an offset value?

When you close and reopen offset, the prompt asking you what your value is, suggests the last value you used.  Right?

I draw aluminum framework windows - the glass may be different in shape and size, but the cross section of the frame remains the same throughout.  Allow me to script an example, if you will...

 

The frame is 2" in x-sect, the glass is, bigger.  So if we have 3 windows, we start with frame, then glass, then frame, then glass, then frame, then glass, and finally frame.  Something like this.

 

2" + 17.625" + 2" + 30.25" + 2" + 17.625" + 2"

 

What I'm looking for is if it's possible to store the 2" somewhere, so I can choose it, rather than have to type it in every time.  Possibly instead of suggesting the last used, it could be adapted to use the last 2...?

 

That's anyone?

 

Thanks,

 

Mark

 

 

0 Likes
Accepted solutions (1)
1,001 Views
7 Replies
Replies (7)
Message 2 of 8

jggerth
Advisor
Advisor

type (SETQ MYVAR 2) at the beginning of your session,

 

Then at the Offset prompt for distance, type in !myvar

 

Or add it as part of a macro

Message 3 of 8

Kent1Cooper
Consultant
Consultant

You may be able to use OFFMULT.lsp, >here<.

Kent Cooper, AIA
Message 4 of 8

MarkFitz
Collaborator
Collaborator

Forgive my ignorance, or perhaps just forgetfulness, Kent, it's been  number of years since I did this kind of stuff, and I dare say a number of versions ago too.  How do I load your lisp routine?  (the help menu wasn't very helpful...)

0 Likes
Message 5 of 8

MarkFitz
Collaborator
Collaborator

Never mind, I was able to load it successfully, now how do I use it...?

0 Likes
Message 6 of 8

Kent1Cooper
Consultant
Consultant
Accepted solution

@MarkFitz wrote:

.... I was able to load it successfully, now how do I use it...?


Read the top of the file.  Just type in the letter O [for Offset] followed by either any single digit [0 through 9] or any letter from A through J.  There are 20 commands defined, so you can save up to 20 regularly-used Offset distances.

 

You could set your example distances into [for example] the OA, OB and OC commands.  Type OA, and it will ask for a distance just as regular Offset does, but if you have set a distance for that command before, it will offer that as the default, so you don't need to type it in again.  [If you haven't, it will offer regular Offset's distance as the default.] Give it 2 for the distance for the OA command, and Offset your edge frame member with it.

Then type OB, and give it 17.625" and Offset the first glass width with that.

Then type OA again, accept the default 2" that's already stored for it, and Offset the next frame member width.

Then type OC, give it 30.25" and Offset the next glass width.

Then type OA again, accept the default 2" and Offset the next frame member width.

Then type OB again, accept the offered default 17.625" and Offset the last glass width.

Then type OA again, accept the default 2" and Offset the last frame member width.

 

Those values will remain as defaults for those 3 commands [but you can change the value in any of the commands any time you use it], for further use in the current drawing, or in other drawings, or [unlike with typical AutoLisp variables] even after you've closed AutoCAD, so you can use them without typing in the values again every time.

 

You can, for example, set other combinations of glass widths into other commands, let's say O3 and O4, but stick with the 2" in OA for the frame members, and do the same kind of arrangement for a different-width opening with OA, O3, OA, O4, OA, O3, OA.  And you can put the glass height into, say, OH, and do the bottom-to-top [or top-to-bottom] of an opening [with no intermediate horizontal mullions] with OA, OH, OA.

 

Etc., etc.

 

Kent Cooper, AIA
Message 7 of 8

Jason.Piercey
Advisor
Advisor

While not exactly what you are looking for but, after you enter it once, you can right click and use the "recent input" option. Just mentioning it in case you were not aware of it.  You could also define a LISP routine to always provide a value of 2".

Message 8 of 8

MarkFitz
Collaborator
Collaborator

Thanks Kent!

 

I can see a little practice required here, but this sounds like exactly what I'm after, and then some!  If they save between drawings, then I can enter all the frame sizes we use and simple apply the new ones as temporary glass sizes.  Genius!!  And I dare say long over due.

 

Many, many thanks!!

0 Likes