Print Page | Close Window

replace Z value with curent elevation

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DXF formats, Design Review, AutoCAD web, Drive, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=10755
Printed Date: 05.Sep.2026 at 12:03


Topic: replace Z value with curent elevation
Posted By: philippe JOSEPH
Subject: replace Z value with curent elevation
Date Posted: 29.Oct.2014 at 11:13
Hello everybody, when I want to work in 3D with a 2D viewpoint I go to OPTIONS, DRAFTING, Replace Z value with current elevation.
Is there an existing command that will give me access directly to this setting like : SAVETIME instead of : OPTIONS, OPEN AND SAVE, XX minutes between saves ?
Is there a place were I could find all these "shortcuts" ?
 
 



Replies:
Posted By: John Connor
Date Posted: 29.Oct.2014 at 12:19
Would OSNAPZ work for you?  When set to a value of "1"...

Osnap substitutes the Z-value of the specified point with the elevation (ELEV) set for the current UCS.

SAVETIME is not a shortcut rather it is a system variable and if you have Express Tools installed you can see the entire list of system variables by invoking the System Variables Editor (SYSVDLG).

SYSVDLG allows you to view, edit, save, and restore system variable settings.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: philippe JOSEPH
Date Posted: 29.Oct.2014 at 13:12
Yes mister John, OSNAPZ work the best for me, when I set it to 1 I can work safely in 3D with a 2D viewpoint.
 
When I set OSNAPZ to 1 and then go to OPTIONS, DRAFTING, Replace Z value with current elevation the setting has effectilevly changed also to 1 ( previously was 0 ), like if I change SAVETIME from 10 to 15 or do it with OPTION, OPEN AND SAVE, XX minutes between saves.
I will explore SYSVLG to view the variables settings but I have to identify the one that I need from the : OPTIONS, XXXXX, YYYYY.
I know a few ones like VIEWRES = OPTIONS, DISPLAY, Display resolution, Arc and circle smoothness.
FACETRES, ISOLINES also.


Posted By: John Connor
Date Posted: 29.Oct.2014 at 14:20
That sounds vaguely like what a surgeon once said during an operation, "Give me what I need, not what I asked for."

Here is a macro that switches it on and off.

^C^C(setvar 'osnapz (abs (1- (getvar 'osnapz))))

Assign it to a button.

Or add this to your acaddoc.lsp file....

(setvar "OSNAPZ" 1)




-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: philippe JOSEPH
Date Posted: 29.Oct.2014 at 14:46
John, I'm also working a lot with my PGP, I will set it there, maybe OZ will be OK for me meaning OSNAPZ.


Posted By: Kent Cooper
Date Posted: 29.Oct.2014 at 19:43
<<  ^C^C(setvar 'osnapz (abs (1- (getvar 'osnapz))))
 
You can do that without the (abs) part, by subtracting the current value from 1, rather than subtracting 1 from the current value:
(setvar 'osnapz (- 1 (getvar 'osnapz)))
 
And if you omit the ^C^C at the beginning, you can use it in the middle of most commands if you want.



Print Page | Close Window