Autocad Internal Values

Autocad Internal Values

dlanorh
Advisor Advisor
1,605 Views
12 Replies
Message 1 of 13

Autocad Internal Values

dlanorh
Advisor
Advisor

Can someone running Autocad 2019 help me out by confirming a couple of internal values. I can't do it myself as I'm working in Autocad 2012.

The values can be obtained through (princ val) . The values are

value              my Guess

ac2013_dwg       60

ac2016_dwg       72

ac2019_dwg       84

 

Thanks

I am not one of the robots you're looking for

0 Likes
Accepted solutions (2)
1,606 Views
12 Replies
Replies (12)
Message 2 of 13

Moshe-A
Mentor
Mentor

hi

 

if you are looking for dwg format then <<enter here>> 

 

 

moshe

 

0 Likes
Message 3 of 13

dlanorh
Advisor
Advisor

@Moshe-A wrote:

hi

 

if you are looking for dwg format then <<enter here>> 

 

 

moshe

 


Unfortunately thats not what I'm looking for. I am accessing the drawing preferences "SaveAsType" variable, which returns an integer value. The returns I can access are as follows:

 

ac2000_dwg       returns  12

ac2004_dwg       returns  24

ac2007_dwg        returns 36

ac2010_dwg        returns 48

 

Where ac????_dwg is an internal AutoCAD variable.

 

From these it is a simple maths to calculate the values for the dxf and template values (+1) & (+2)

But I cannot access anything above 2010 as I'm using AutoCAD2012.

 

My best guess would be ac2013_dwg would return 60 etc as per my initial post. I have been accessing the values using (princ) on the command line, so

 

(princ ac2010_dwg) ==> 48

 

I am just trying to find out if this continues on a 3 year cycle for versions AutoCAD2013 and above or if it differs.

 

Hope that makes sense.

 

I am not one of the robots you're looking for

0 Likes
Message 4 of 13

Moshe-A
Mentor
Mentor
Accepted solution

here you go

 

ac2010_dwg returns 48

ac2013_dwg returns 60

ac2018_dwg returns 64

 

dwg2010format (include from R2010 up to R2012)

dwg2013format (include from R2013 up to R2017)

dwg2018format (include from R2018 up to R2019)

 

but why this concerns you, why don't you use the enumerator values?

 

moshe

 

0 Likes
Message 5 of 13

vladimir_michl
Advisor
Advisor
Accepted solution

The environment variable DefaultFormatForSave does not accept enumerators, you need the number codes. See:

http://www.cadforum.cz/cadforum_en/qaID.asp?tip=6439

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

0 Likes
Message 6 of 13

Moshe-A
Mentor
Mentor

Vladimir,

 

you 'absolutely' right, but can we do that???

 

(setenv "DefaultFormatForSave" (rtos ac2010_dwg 2 0))

 

 

 

0 Likes
Message 7 of 13

Moshe-A
Mentor
Mentor

or that

 

(setenv "DefaultFormatForSave" (itoa ac2010_dwg))

0 Likes
Message 8 of 13

dlanorh
Advisor
Advisor

I'm doing it through VL

 

(vla-put-saveastype (vla-get-opensave (vla-get-preferences (vlax-get-acad-object))) ac????_???)

I haven't tried substituting an integer for ac????_??? yet. I've just been concentration on getting the value and converting it to a string representation. If I know all the values up to current I can accomplish this without having to construct a long associate list.

I am not one of the robots you're looking for

0 Likes
Message 9 of 13

Moshe-A
Mentor
Mentor

yes you are good

 

 

(vla-put-SaveAsType (vla-get-OpenSave (vla-get-preferences (vlax-get-acad-object))) ac2010_dwg)

the argument for SaveAsType property is the enumerator (look at the documentation) and there is no need to convert it to string like (setenv) requires

 

if you are using the vlide editor, you will see that the enumerators are in blue that means they are constants and known (defined) in the visual lisp environment.

 

moshe

 

 

0 Likes
Message 10 of 13

dlanorh
Advisor
Advisor

I'm converting it into a string the user can read i.e.

 

Current setting ==> 36  ==> "AutoCAD 2010 DWG (*.dwg)"

Current setting ==> 38  ==> "AutoCAD 2010 TEMPLATE (*.dwt)"

 

This will be incorporated into a toolbar along with a button to allow users to toggle between 2 or 3 formats before a "save", "qsave" or "SaveAs"

I am not one of the robots you're looking for

0 Likes
Message 11 of 13

Moshe-A
Mentor
Mentor

only saveas has a format option

if you still have difficulties in finishing this tell me more what is your goal?

 

0 Likes
Message 12 of 13

dlanorh
Advisor
Advisor

@Moshe-A wrote:

only saveas has a format option

if you still have difficulties in finishing this tell me more what is your goal?

 


I agree, but typing "save" or "qsave" on a new drawing brings up the "saveas" dialog, also changing saveastype in an already saved drawing forces any "save" or "qsave" command to the "saveas" dialog with the new saveastype already set.

 

We have clients who run multiple versions of AutoCAD as well as other design packages, and they require drawings in (*.dwg) (*.dxf) and (*.dwt) formats. This is just designed to streamline saving the same drawing into different formats.

I am not one of the robots you're looking for

0 Likes
Message 13 of 13

Moshe-A
Mentor
Mentor

'clients' you mean consultants (the real clients ask for PDF or DWF) and you are totally spoiling them for free.

cause you could email them a link to download DwgTrueView. as long as you keep serving them on silver plate, they won't even think of upgrade but if you 'transfer' the responsibility to them and they will see the time they have to spent for converting files, maybe they will think again.

 

moshe

 

0 Likes