Display full version of the post: Combine Autosave & elevation

Sandervp
03.06.2014, 10:19
Hello,I do have a problem with the elevation variable. This variable jumps sometimes from Z=0 to an other Z value. The moment of changing is unknown to me.I wan't to combine this elevation command with the autosave settings. Befor every autosave moment runs the elevation command first automatically.Does anybody know how I can change this autosave variable/reactor?When AutoCad starts, 2 lisp files automatically runs. These 2, which I've created, do change my Osnapz setting into 0 and also my Elevation to 0.The Osnapz setting is no problem. This doesn't change. But the elevation does.I'm using Autocad 2014Thanks for your help

John Connor
03.06.2014, 11:16
Variables do not change on their own.  They change because of a poorly written lisp routine or when a user abruptly exits a command in an unconventional manner.

Sandervp
03.06.2014, 12:28
Hello John,When a command is in progress and I am finished with that command, I push on the Enter of spacebar button. Also the right mouse button stops the command because of my own right-click customization.Sometimes I push on the escape button to end a command but this doesn't change the elevation value.The lisp-routine looks like this; (setvar "ELEVATION" 0). Would you change this lisp-routine? It does works. 

John Connor
03.06.2014, 13:07
My point is that variables like Elevation just don't mysteriously change all by themselves.No, I would not change what you have.

Sandervp
03.06.2014, 13:59
I also use another application in combination with AutoCad. It is called "StabiCad".With this program I can draw elements which has to do with Air Heating/ Cooling, Water supply, sewerage... Everything from the mechanical engineering side.When I want to draw an Air duct, I first need to insert a height. Have I done that, I can draw the duct. With other functions from that program, I can say, I want a 45° bend or a 90° bend to another height.For example; I start at z=3000 and after a 90° bend I want to go to z=4500.This program needs heights to draw everything oke. Do I make a cross-over with 2 ducts and 1 duct is laying higher then the other, I see a yellow "hidden" linetype line at the point where they cross each other.This image shows you 2 round air ducts which cross each other on a different height.But when my elevation value is not 0 but suddenly something else, it isn't a z-value which I'd used with the other application.For example; I'd drawed a sewer pipe on a height of 2500, I didn't choose another height. It is possible that the elevation value isn't 0 but 1873.456 or something else. In any case, not a height I had been used.That is why I want to combine the autosave and elevation command. To reduce this elevation problem. 

John Connor
03.06.2014, 14:08
So are you saying StabiCAD is responsible for the elevation being changed without your direct input?Since you are using AutoCAD 2014 why not record a macro, save it, then replay it every time you need to?  This feature is called the Action Recorder and it can be found on the Manage tab.

Sandervp
03.06.2014, 14:37
I didnt worked with action recorder yet. So I do not know how I can use this exactly.But I have created a toolbar button already. This contain the following macro: ^C^C_elev;0;0;How do I use the Action recorder exactly? I see a yellow circle next to my aperture and the following text is standing in the command bar; ** ACTRECORD command not allowed during recording an action macro **.

John Connor
03.06.2014, 14:44
The use of the Action Recorder is covered in your AutoCAD Help file.  You start the Recorder, run through all the commands you normally would then stop the Recorder.  You assign the macro an unique name and Play it back whenever required.One of the macros I created with the Action Recorder purges and audits a drawing, then it does a zoom > extents and finally starts the save command.
John Connor2014-06-03 14:44:56

Sandervp
04.06.2014, 08:11
If I understand it, Action recorder does create a sort of lisp file.Like if I push the lettercombination "PAS", Autocad shall purge the drawing 3 times, after that he will audit the drawing and at last he will save the drawing.And with "LZE" AutoCad jumps from layout to layout and ends at the model but between every jump he shall first do the zoom extents command.But if I create a lisp file for elevation = 0. With as result I only have to push 1 button and the command is running.But because I do not know at which moment my elevation is changing to another value, I want to combine this with the autosave. Otherwise I need to push the lettercombination from the created elevation lisp file after almost every action. (excuse me for my English, but I hope you understand it)

John Connor
04.06.2014, 12:19
The Action Recorder creates macros; it does NOT create lisp routines.Use whatever method you want.  No one is forcing you to do anything.I see no benefit to coupling a change in elevation back to zero with autosave.  It makes no sense.  But you can do anything you like; it's your computer and your drawing.