AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Permanent variable?

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
2058 Views, 10 Replies

Permanent variable?

Is it possible to create a variable to become part of the drawing and is
available next time you open the drawing?

i.e. 2nd floor ht = 2700

(setq FL2 2700) and it sticks in the drawing.



L for Learner!
10 REPLIES 10
Message 2 of 11
David_W_Koch
in reply to: Anonymous

There are five "user" integer variables and five real number variables that are saved with the file"
USERI1, USERI2, USERI3, USERI4, and USERI5
and
USERR1, USERR2, USERR3, USERR4, and USERR5.

There are also five "user" string variables, but those are not saved in the drawing file - the values are lost when closing the file (USERS1, USERS2, USERS3, USERS4, and USERS5).

If you are into customization, it would also be possible to add your own "extended" data to any object, and I suppose you could also create your own dictionaries into which you could store whatever you wanted.

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 3 of 11
Anonymous
in reply to: Anonymous

Thanks David
So I could write my FL2 variable to USERI1 variable and then fetch it when I
start again.

What's the difference between these and any variable? Just the fact that
they are written to the drawing file itself?

By Extended data you mean a PSD?
Since this is not an entity I guess I could create an entity to sit in the
drawing with the required data.
Maybe a telephone pole? 🙂

Thanks, one of these should get me there.


wrote in message news:6277237@discussion.autodesk.com...
There are five "user" integer variables and five real number variables that
are saved with the file"
USERI1, USERI2, USERI3, USERI4, and USERI5
and
USERR1, USERR2, USERR3, USERR4, and USERR5.

There are also five "user" string variables, but those are not saved in the
drawing file - the values are lost when closing the file (USERS1, USERS2,
USERS3, USERS4, and USERS5).

If you are into customization, it would also be possible to add your own
"extended" data to any object, and I suppose you could also create your own
dictionaries into which you could store whatever you wanted.
Message 4 of 11
David_W_Koch
in reply to: Anonymous

If FL2 is always an integer value, then yes, you could store and retrieve the value from USERI1 if you want, provided that you do not have any other customizations running that make use of that.

I was not thinking of Property Set Definitions when I was referring to extended data, but since you are running ACA anyway, if you can create an object that would not be easy to delete, it would probably be easier for you to use ACA properties than to learn how to use extended data or dictionaries. (I really do not know how to use either of those properly, myself.)

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 5 of 11
Anonymous
in reply to: Anonymous

excellant thanks!

wrote in message news:6277423@discussion.autodesk.com...
If FL2 is always an integer value, then yes, you could store and retrieve
the value from USERI1 if you want, provided that you do not have any other
customizations running that make use of that.

I was not thinking of Property Set Definitions when I was referring to
extended data, but since you are running ACA anyway, if you can create an
object that would not be easy to delete, it would probably be easier for you
to use ACA properties than to learn how to use extended data or
dictionaries. (I really do not know how to use either of those properly,
myself.)
Message 6 of 11
Anonymous
in reply to: Anonymous

These values seem to operate different to other variables.
I type !useri1 and the value is correct.
I look in (expresstools) Tools>system variable editor and the value is 0.
I save, close and open and the value is reset to 0 anyway.

How about reading a field in lisp? If I create fields in drawing properties
to hold the value could I access it that way?

"Nathan" wrote in message
news:6277481@discussion.autodesk.com...
excellant thanks!

wrote in message news:6277423@discussion.autodesk.com...
If FL2 is always an integer value, then yes, you could store and retrieve
the value from USERI1 if you want, provided that you do not have any other
customizations running that make use of that.

I was not thinking of Property Set Definitions when I was referring to
extended data, but since you are running ACA anyway, if you can create an
object that would not be easy to delete, it would probably be easier for you
to use ACA properties than to learn how to use extended data or
dictionaries. (I really do not know how to use either of those properly,
myself.)
Message 7 of 11
David_W_Koch
in reply to: Anonymous

That is certainly odd. The USERI1 system variable appears to be working as expected here, using 2010 and starting with the out-of-the-box Aec Model (Imperial Stb).dwt template file. I was able to save a value to that system variable by directly entering the value (after typing USERI1 at the Command prompt). After saving and reopening the file, the value remained. I also use the Express Tools System Variable dialog (_.sysvdlg command) and the value showed up as entered. If I changed the value in the System Variable dialog, the value "stuck" after saving and reopening.

I have no experience trying to read field values or project properties via LISP.

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 8 of 11
Anonymous
in reply to: Anonymous

Robert Bell comfirmed they are supposed to be saved in the drawing.

I got USERI1 value to stick with the save but typing !USERI1 returns 0 so i
don't understand.
I got FL2 to be USERI1 🙂 but not 2914

Using fields might give me more flexibility anyway - if I can work out how
to do it.

Thanks David.

wrote in message news:6282175@discussion.autodesk.com...
That is certainly odd. The USERI1 system variable appears to be working as
expected here, using 2010 and starting with the out-of-the-box Aec Model
(Imperial Stb).dwt template file. I was able to save a value to that system
variable by directly entering the value (after typing USERI1 at the Command
prompt). After saving and reopening the file, the value remained. I also
use the Express Tools System Variable dialog (_.sysvdlg command) and the
value showed up as entered. If I changed the value in the System Variable
dialog, the value "stuck" after saving and reopening.

I have no experience trying to read field values or project properties via
LISP.
Message 9 of 11
David_W_Koch
in reply to: Anonymous

If you type !USERI1 at the Command prompt, it will return the value of an AutoLISP variable named USERI1.

The value of System Variable USERI1 can be set/inspected by typing just USERI1 (no exclamation point in front). In an AutoLISP routine, use (getvar "USERI1") to retrieve the value of USERI1 and use (setvar "USERI1" nnn), where nnn is an integer value or an expression that evaluates to an integer value, to set the value.

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 10 of 11
Anonymous
in reply to: Anonymous

Ok that's clear enough now. I should be able to set that to work, thanks
David.



wrote in message news:6282862@discussion.autodesk.com...
If you type !USERI1 at the Command prompt, it will return the value of an
AutoLISP variable named USERI1.

The value of System Variable USERI1 can be set/inspected by typing just
USERI1 (no exclamation point in front). In an AutoLISP routine, use (getvar
"USERI1") to retrieve the value of USERI1 and use (setvar "USERI1" nnn),
where nnn is an integer value or an expression that evaluates to an integer
value, to set the value.
Message 11 of 11
didman78
in reply to: David_W_Koch

Hello

I want create a personnal tag with all set definition

doors, wall, windows, spaces, zones…use in personnal parametre

î >>https://help.autodesk.com/view/ARCHDESK/2025/FRA/?guid=GUID-3034E3CE-1745-4703-B2BE-43986515DC29

for create personnal Tag

- TAG exist and explode ok

- create attribut ok

champ create ok

but how search functionnlity in spaces for detect and attach with this AEC objet

 

 “SPACEOBJECTS:NUMBER” Attribute and edit Tag “SPACEOBJECTS:BASEAREA”.

 

I search this function for link in my tag

 

thanks

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report