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: 

Layer Standard

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
575 Views, 13 Replies

Layer Standard

Is there a way to read the Layer standard?

Thanks
13 REPLIES 13
Message 2 of 14
David_W_Koch
in reply to: Anonymous

Assuming that you do indeed mean Layer Standard, and not Layer Key Style, and farther assuming that you do not consider what you can see in the Layer Standard Properties dialog does not constitue "reading", the best I can offer is the ability to export a Layer Standard to a text file. You could print that out and "read" it, but it is not a real page turner. In 2004 and later, you should be able to run the AecLayerSaveStdAsText AutoLISP function to generate a text file with the contents of the Layer Standard in it. The syntax is:

(AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes" "Drive:\\Path\\FileName.txt")

You will, of course, need to substitute the actual Layer Standard name, enclosed in double quotation marks, for "LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file name of the text file you want to create, enclosed in double quotation marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a single forward slash in lieu of the double back slashes, to separate the drive letter, folder names and file name, if you want. Single back slashes, however, will not work (it is a LISP thing).

There is an ARX file that defines that AutoLISP function, along with other Layer-Standard-related functions, that has to be loaded for the function to work. This ARX file is not automatically loaded when you start ADT/ACD-A, and will not be demand loaded just by calling the AutoLISP function. You can find more on this in this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands and what they do. Note also that ARX file name for both the 2008 and 2009 releases is the "unversioned" AecLMgrLisp.arx.

A brief excerpt from the beginning of the Layer Standard that is used where I work follows, to give you a sense of what the output of this function will be. There is also a function that will allow you to import a Layer Standard from a text file. I found this useful for getting the Minor1 and Minor2 Descriptive Fields to have the same pre-loaded values, without having to enter the values twice in the dialogs. There are also export and import functions that write to a "non-readable" LDF format, if the only reason for the export/import is to transfer a Layer Standard between machines without using a drawing file.

**EC Layer Standard
*c
-
Name Discipline Designator 1
MaxWidth 1
Delimiter
Wcmatch [~.],[~.][~.]
Optional No
Fixed Yes
Default A
MustMatch No
-
Name Discipline Designator 2
MaxWidth 1
Delimiter
Wcmatch [~.],[~.][~.]
Optional Yes
Fixed Yes
Default D
MustMatch No
-
Name Major
MaxWidth 4
Delimiter -
Wcmatch [~.][~.][~.][~.]
Optional No
Fixed Yes
Default Wall
MustMatch No
-
Name Minor1
MaxWidth 4
Delimiter -
Wcmatch *
Optional Yes
Fixed Yes
Default Iden
MustMatch No
-
Name Minor2
MaxWidth 4
Delimiter -
Wcmatch *
Optional Yes
Fixed Yes
Default Text
MustMatch No
-
Name Status
MaxWidth 1
Delimiter -
Wcmatch *
Optional Yes
Fixed Yes
Default N
MustMatch No
*
*d
-
Discipline Designator
0 1
A Architectural
*+
D Architectural Demolition
E Architectural Elements
F Architectural Finishes
G Architectural Graphics
I Architectural Interior
J Architectural (User Defined)
K Architectural (User Defined)
P Architectural Paving
S Architectural Site
T Architectural Transportation
*-
B Geotechnical
*+
J Geotechnical (User Defined)
K Geotechnical (User Defined)
*-
etc, etc, etc.

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 3 of 14
Anonymous
in reply to: Anonymous

That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 4 of 14
David_W_Koch
in reply to: Anonymous

Apparently I misinterpretted what you meant by "read". Unfortunately, you would need to already know the name of the Layer Standard to make use of the AecLayerSaveStdAsText or AecLayerSaveStdAsLDF function.

I am also not certain, from what you wrote, that you want the Layer Standard or the Layer Key Style. For example, if you are trying to have different layers for a given object type when it appears on different floors, all in a single drawing file, one Layer Standard could define the layer structure for all of the layers. If the layer attributes (color, linetype, etc) are the same for each floor, the only difference being the value of the "level designator" field, then one Layer Key Style could be used, with Layer Key Overrides. If you want different attributes assigned to the layers for different levels (eg, level 1 Walls are green, level 2 Walls are red) or if you simply prefer switching Layer Key Styles to setting Layer Key Overrides, you could set up a separate Layer Key Style for each level, but all could use the same Layer Standard.

NOTE: If you are familiar with the VL AutoLISP functions or VBA, I believe there is an easier way to grab the information noted below than my old-school LISP hacks.

There does not appear to be an AutoLISP function for retrieving the name of the current Layer Standard or Layer Key Style. The name of the current Layer Key Style is stored in the "AEC_VARS_DWG_SETUP" dictionary, which is a sub-dictionary of the "AEC_VARS" dictionary in the main dictionary. (dictsearch (namedobjdict) "AEC_VARS") will return the contents of the "AEC_VARS" dictionary, then you have to wade through the list of subdictionaries - 3 groups - to find the "AEC_VARS_DWG_SETUP" entry and grab the entity name in the 350 group that follows. The "AEC_VARS_DWG_SETUP" entity name can then be used to get the content of that dictionary. The 9 group in there will have the name of the current Layer Key Style. The second 5 group in there will have the name of the auto-import file, if one is specified. You could then go to the "AEC_LAYERKEY_STYLES" dictionary under the main dictionary and get the entity name and data for the current Layer Key Style. The first 4 group in that data will give the name of the Layer Standard to which that Layer Key Style applies.

LDF is the file extension Autodesk assigns to Layer Definition Files, created by the AecLayerSaveStdAsLDF function and imported by the AecLayerLoadStdAsLDF function. I have not used them much, but I assume that they are output in some sort of coded format that would not mean anything to you or me.

David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 5 of 14
Anonymous
in reply to: Anonymous

Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 6 of 14
Anonymous
in reply to: Anonymous

I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 7 of 14
Anonymous
in reply to: Anonymous

Hey thanks Buzz, I appreciate that muchly. I had downloaded the OpenDCL
package and wanted to create an interface for the levels thing. Really
intrigued to review the approach you took. I have much to learn on the
lisping (well everything really). I'll post back.


"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 8 of 14
Anonymous
in reply to: Anonymous

I had been using DCL but the dialogs took so long to load up I switched just
last month.


"Nathan" wrote in message
news:6147589@discussion.autodesk.com...
Hey thanks Buzz, I appreciate that muchly. I had downloaded the OpenDCL
package and wanted to create an interface for the levels thing. Really
intrigued to review the approach you took. I have much to learn on the
lisping (well everything really). I'll post back.


"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 9 of 14
Anonymous
in reply to: Anonymous

If it's this complicated I'm in trouble 🙂

"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 10 of 14
Anonymous
in reply to: Anonymous

Start small, then when you see patterns things can be combined, or as
problems happen that is when they can be fixed. The fuction I posted has
grown to be this big over a 14 year period of time.

keep up the fight.

"Nathan" wrote in message
news:6147709@discussion.autodesk.com...
If it's this complicated I'm in trouble 🙂

"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 11 of 14
Anonymous
in reply to: Anonymous

hehe...thanks Buzz. I did spend some time tracing thru your code.
I was hoping to see a cute dialogue box but it wouldn't work for some
reason.
Is there an order to load the files? I started with Initialise.lsp
I put all your files in a folder that I added a link to in the support path.
Maybe I haven;t loaded all the OpenDCL that I need to though itis installed.
I can see that a lot of code sets up the drawing whereas I was thinking of
just setting it up in a template.
I started to review layer filters and snapshots as I haven't used them
before. I presume filters are of more use than just viewing in the layer
dialogue box. (I usedto use LMAN back in 2d flatland days).
I had already created Ground Floor & Upper Floor filters but just wasn't
sure how I would utilize them.
My goal would to create the whole model in the one drawing.
Then documentation could be created in the same drawing (maybe in paperspace
ugh!) or it could be x-ref'd into another drawing to do doc's either with
the PN or not.
I tend to just use Paperspace tabs for all my separate sheets. Simple - 1
drawing but I do tend to xref in entourage and vehicles for a 3D rendering.
All up I try to keep it simple.
Thanks - I'll continue to explore the files.

"Buzzie09" wrote in message
news:6147827@discussion.autodesk.com...
Start small, then when you see patterns things can be combined, or as
problems happen that is when they can be fixed. The fuction I posted has
grown to be this big over a 14 year period of time.

keep up the fight.

"Nathan" wrote in message
news:6147709@discussion.autodesk.com...
If it's this complicated I'm in trouble 🙂

"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 12 of 14
Anonymous
in reply to: Anonymous

Open Up the visual lisp IDE
at the command prompt type "VLIDE"
then from the "Project" pull down select "open project".
then browse to the location of the "planlay.prj" file
A small floating window with the list of lisp files should appear.
to load all the files select the 3rd button of that window.

the other great thing about the VLIDE is the error trace. This can be found
under the view menu. when you code is run from the IDE it will update
itself to the last error. By right clicking on the "[2]" item in the error
trace will bring up a context sensitive menu.

I think that because you have installed openDCL it should automatically load
itself as needed. "Source Position" and "Call Point Source" are the 2
selections that will bring you to the point of error in your code.

The reason I have not used Lman is because it holds a list, without wild
cards. whereas layer filters can hold wild cardss, but I think that Lman
will also allow you to change the layer color orline typee when changing
states. If I were to create a new layer that was not in the list of Lman
layers it would be left alone and nothing would happen to it.

hth
Matthew

"Nathan" wrote in message
news:6148406@discussion.autodesk.com...
hehe...thanks Buzz. I did spend some time tracing thru your code.
I was hoping to see a cute dialogue box but it wouldn't work for some
reason.
Is there an order to load the files? I started with Initialise.lsp
I put all your files in a folder that I added a link to in the support path.
Maybe I haven;t loaded all the OpenDCL that I need to though itis installed.
I can see that a lot of code sets up the drawing whereas I was thinking of
just setting it up in a template.
I started to review layer filters and snapshots as I haven't used them
before. I presume filters are of more use than just viewing in the layer
dialogue box. (I usedto use LMAN back in 2d flatland days).
I had already created Ground Floor & Upper Floor filters but just wasn't
sure how I would utilize them.
My goal would to create the whole model in the one drawing.
Then documentation could be created in the same drawing (maybe in paperspace
ugh!) or it could be x-ref'd into another drawing to do doc's either with
the PN or not.
I tend to just use Paperspace tabs for all my separate sheets. Simple - 1
drawing but I do tend to xref in entourage and vehicles for a 3D rendering.
All up I try to keep it simple.
Thanks - I'll continue to explore the files.

"Buzzie09" wrote in message
news:6147827@discussion.autodesk.com...
Start small, then when you see patterns things can be combined, or as
problems happen that is when they can be fixed. The fuction I posted has
grown to be this big over a 14 year period of time.

keep up the fight.

"Nathan" wrote in message
news:6147709@discussion.autodesk.com...
If it's this complicated I'm in trouble 🙂

"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 13 of 14
Anonymous
in reply to: Anonymous

Hi Buzz
I am working thru a number of things and would hope to have something to
offer though it may take me a few weeks plus I am heading off for holiday
for 3 weeks. Would you care to post a comment with your email to my blog (I
won't publish it) so I can converse with you offline.

I am presently reworking an old 2 storey house job into a one file approach
and setting it all up as I would like so I can fully test any systems I
develop. I would be happy to send it to you along with my simple lisp. At
some point I was hoping to post it as an example.

I found it interesting that a one file approach was bagged by Adesk and now
it is a marketing plus for the frog. Visionrez have it set up that way but
I didn't like how they only used the tabs for printing and not containing
the title sheet although I would assume that would be very easy to adapt in
the template.
Also putting your text and dims in paperspace would make the model space
very clean for rendering etc though I thought by your posted example's lack
of material use that you probably don't do any renderings. There is at
least one guy who posted a while back who does it like that and was very
positive about it.

p.s. I presently work for a property developer and don't do CD's inhouse so
I don't have any opportunity to work on these ideas there except just the
model approach in model space and some text in paperspace.

www.ausaca.blogspot.com


"Buzzie09" wrote in message
news:6148983@discussion.autodesk.com...
Open Up the visual lisp IDE
at the command prompt type "VLIDE"
then from the "Project" pull down select "open project".
then browse to the location of the "planlay.prj" file
A small floating window with the list of lisp files should appear.
to load all the files select the 3rd button of that window.

the other great thing about the VLIDE is the error trace. This can be found
under the view menu. when you code is run from the IDE it will update
itself to the last error. By right clicking on the "[2]" item in the error
trace will bring up a context sensitive menu.

I think that because you have installed openDCL it should automatically load
itself as needed. "Source Position" and "Call Point Source" are the 2
selections that will bring you to the point of error in your code.

The reason I have not used Lman is because it holds a list, without wild
cards. whereas layer filters can hold wild cardss, but I think that Lman
will also allow you to change the layer color orline typee when changing
states. If I were to create a new layer that was not in the list of Lman
layers it would be left alone and nothing would happen to it.

hth
Matthew

"Nathan" wrote in message
news:6148406@discussion.autodesk.com...
hehe...thanks Buzz. I did spend some time tracing thru your code.
I was hoping to see a cute dialogue box but it wouldn't work for some
reason.
Is there an order to load the files? I started with Initialise.lsp
I put all your files in a folder that I added a link to in the support path.
Maybe I haven;t loaded all the OpenDCL that I need to though itis installed.
I can see that a lot of code sets up the drawing whereas I was thinking of
just setting it up in a template.
I started to review layer filters and snapshots as I haven't used them
before. I presume filters are of more use than just viewing in the layer
dialogue box. (I usedto use LMAN back in 2d flatland days).
I had already created Ground Floor & Upper Floor filters but just wasn't
sure how I would utilize them.
My goal would to create the whole model in the one drawing.
Then documentation could be created in the same drawing (maybe in paperspace
ugh!) or it could be x-ref'd into another drawing to do doc's either with
the PN or not.
I tend to just use Paperspace tabs for all my separate sheets. Simple - 1
drawing but I do tend to xref in entourage and vehicles for a 3D rendering.
All up I try to keep it simple.
Thanks - I'll continue to explore the files.

"Buzzie09" wrote in message
news:6147827@discussion.autodesk.com...
Start small, then when you see patterns things can be combined, or as
problems happen that is when they can be fixed. The fuction I posted has
grown to be this big over a 14 year period of time.

keep up the fight.

"Nathan" wrote in message
news:6147709@discussion.autodesk.com...
If it's this complicated I'm in trouble 🙂

"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.
Message 14 of 14
Anonymous
in reply to: Anonymous

🙂
Thanks for your comment. I'm unsure whether to publish it as it doesn't
contain your email...
but thanks for the encouragement.


"Nathan" wrote in message
news:6151170@discussion.autodesk.com...
Hi Buzz
I am working thru a number of things and would hope to have something to
offer though it may take me a few weeks plus I am heading off for holiday
for 3 weeks. Would you care to post a comment with your email to my blog (I
won't publish it) so I can converse with you offline.

I am presently reworking an old 2 storey house job into a one file approach
and setting it all up as I would like so I can fully test any systems I
develop. I would be happy to send it to you along with my simple lisp. At
some point I was hoping to post it as an example.

I found it interesting that a one file approach was bagged by Adesk and now
it is a marketing plus for the frog. Visionrez have it set up that way but
I didn't like how they only used the tabs for printing and not containing
the title sheet although I would assume that would be very easy to adapt in
the template.
Also putting your text and dims in paperspace would make the model space
very clean for rendering etc though I thought by your posted example's lack
of material use that you probably don't do any renderings. There is at
least one guy who posted a while back who does it like that and was very
positive about it.

p.s. I presently work for a property developer and don't do CD's inhouse so
I don't have any opportunity to work on these ideas there except just the
model approach in model space and some text in paperspace.

www.ausaca.blogspot.com


"Buzzie09" wrote in message
news:6148983@discussion.autodesk.com...
Open Up the visual lisp IDE
at the command prompt type "VLIDE"
then from the "Project" pull down select "open project".
then browse to the location of the "planlay.prj" file
A small floating window with the list of lisp files should appear.
to load all the files select the 3rd button of that window.

the other great thing about the VLIDE is the error trace. This can be found
under the view menu. when you code is run from the IDE it will update
itself to the last error. By right clicking on the "[2]" item in the error
trace will bring up a context sensitive menu.

I think that because you have installed openDCL it should automatically load
itself as needed. "Source Position" and "Call Point Source" are the 2
selections that will bring you to the point of error in your code.

The reason I have not used Lman is because it holds a list, without wild
cards. whereas layer filters can hold wild cardss, but I think that Lman
will also allow you to change the layer color orline typee when changing
states. If I were to create a new layer that was not in the list of Lman
layers it would be left alone and nothing would happen to it.

hth
Matthew

"Nathan" wrote in message
news:6148406@discussion.autodesk.com...
hehe...thanks Buzz. I did spend some time tracing thru your code.
I was hoping to see a cute dialogue box but it wouldn't work for some
reason.
Is there an order to load the files? I started with Initialise.lsp
I put all your files in a folder that I added a link to in the support path.
Maybe I haven;t loaded all the OpenDCL that I need to though itis installed.
I can see that a lot of code sets up the drawing whereas I was thinking of
just setting it up in a template.
I started to review layer filters and snapshots as I haven't used them
before. I presume filters are of more use than just viewing in the layer
dialogue box. (I usedto use LMAN back in 2d flatland days).
I had already created Ground Floor & Upper Floor filters but just wasn't
sure how I would utilize them.
My goal would to create the whole model in the one drawing.
Then documentation could be created in the same drawing (maybe in paperspace
ugh!) or it could be x-ref'd into another drawing to do doc's either with
the PN or not.
I tend to just use Paperspace tabs for all my separate sheets. Simple - 1
drawing but I do tend to xref in entourage and vehicles for a 3D rendering.
All up I try to keep it simple.
Thanks - I'll continue to explore the files.

"Buzzie09" wrote in message
news:6147827@discussion.autodesk.com...
Start small, then when you see patterns things can be combined, or as
problems happen that is when they can be fixed. The fuction I posted has
grown to be this big over a 14 year period of time.

keep up the fight.

"Nathan" wrote in message
news:6147709@discussion.autodesk.com...
If it's this complicated I'm in trouble 🙂

"Buzzie09" wrote in message
news:6147497@discussion.autodesk.com...
I posted what I have so far to the customer files news group. I don't have
the things we talked about in this thread incorporated yet. I have included
a sample drawing file so you can see the function in action. Hope it helps

You will need to install the OpenDCL runtime to test the functionality.
I am doing things just as you suggest. with the command line.

If you would like further explanation I'd be glad to help. Or, if what I'm
doing is silly, maybe I'm a bit old fashioned, some parts of this code I
have had since r12.

Let me know if you have a better way



"Nathan" wrote in message
news:6146913@discussion.autodesk.com...
Buzz, I am trying to achieve the same thing. I think multiple files for
residential is overkill though I don't mind those using the PN etc as I
would still separate some things but I want the complete house model in the
same file.
I am new to lisp and am working thru it slowly.
I created a new layerkey style based on a numeric to start ie. 1-Wall,
2-Roof, Site-Bdry etc.
What didn't work with your system of lisp?

Here's a brief cut & Paste of what I've started with but I know I need need
more variables (for e.g. CurLevel,CurDisplayRep). Maybe I'm way off base
from how you are going about it.

(Defun C:L1 ()
(command "-LAYER" "m" "1-Tx" "OFF" "*" "N" "ON" "1*" "" "elevation" "0"
"osnapz" "1" "" )
(command "-DisplayConfigSetCurrent" "presentation")
) ;;;okay I know that's using a jackhammer instead of a pick!
;;(AecSetLayerKeyOverride "Level" "2")
;;(setq CurDispStyle (getvar CurDispStyle) What is command?

As you can see I've got a way to go. I'm concerned that some items can't be
reached via lisp. Some things seem undocumented.

Thanks David for the info.


"Buzzie09" wrote in message
news:6145948@discussion.autodesk.com...
That is awesome, your assumptions have been correct so far.
I am working in a primarily residential design environment. We have
decided that it would be easier to check for inconsistencies if the plans
were all stacked on top of each other in the same file. I have previously
written some lisp code that would react to the changing of the current layer
and set the Layer Standard accordingly. I was maintaining the layer standard
two places. I thought it would be easy enough to "read" the Layer Standard
from the drawing file programmatically. I spent some time using the VB
object browser looking for a function or method that would do the trick, but
was unable to find anything.

I didn't want to say I wanted a lisp, vba or dotnet solution for fear
that no one would answer. Reading the Layer Standard from a text file still
seems like a work around, compared to getting the information directly from
where it is stored. If that is the best that can be done that is what I've
got to do. It dose look pretty easy to read / import the data I need to
use from the text file.

What is LDF format?

Thank You

wrote in message news:6145628@discussion.autodesk.com...
Assuming that you do indeed mean Layer Standard, and not Layer Key Style,
and farther assuming that you do not consider what you can see in the Layer
Standard Properties dialog does not constitue "reading", the best I can
offer is the ability to export a Layer Standard to a text file. You could
print that out and "read" it, but it is not a real page turner. In 2004 and
later, you should be able to run the AecLayerSaveStdAsText AutoLISP function
to generate a text file with the contents of the Layer Standard in it. The
syntax is: (AecLayerSaveStdAsText "LayerStandardNameHereInDoubleQuotes"
"Drive:\\Path\\FileName.txt") You will, of course, need to substitute the
actual Layer Standard name, enclosed in double quotation marks, for
"LayerStandardNameHereInDoubleQuotes" and the drive letter, path and file
name of the text file you want to create, enclosed in double quotation
marks, for "Drive:\\Path\\FileName.txt". For the latter, you can use a
single forward slash in lieu of the double back slashes, to separate the
drive letter, folder names and file name, if you want. Single back slashes,
however, will not work (it is a LISP thing). There is an ARX file that
defines that AutoLISP function, along with other Layer-Standard-related
functions, that has to be loaded for the function to work. This ARX file is
not automatically loaded when you start ADT/ACD-A, and will not be demand
loaded just by calling the AutoLISP function. You can find more on this in
this blog article:
http://architects-desktop.blogspot.com/2007/06/acaadt-layer-lisp-functions.html
along with a link to Mark Webb's PDF that summarizes the various commands
and what they do. Note also that ARX file name for both the 2008 and 2009
releases is the "unversioned" AecLMgrLisp.arx. A brief excerpt from the
beginning of the Layer Standard that is used where I work follows, to give
you a sense of what the output of this function will be. There is also a
function that will allow you to import a Layer Standard from a text file. I
found this useful for getting the Minor1 and Minor2 Descriptive Fields to
have the same pre-loaded values, without having to enter the values twice in
the dialogs. There are also export and import functions that write to a
"non-readable" LDF format, if the only reason for the export/import is to
transfer a Layer Standard between machines without using a drawing file.
**EC Layer Standard *c - Name Discipline Designator 1 MaxWidth 1 Delimiter
Wcmatch [~.],[~.][~.] Optional No Fixed Yes Default A MustMatch No - Name
Discipline Designator 2 MaxWidth 1 Delimiter Wcmatch [~.],[~.][~.] Optional
Yes Fixed Yes Default D MustMatch No - Name Major MaxWidth 4 Delimiter -
Wcmatch [~.][~.][~.][~.] Optional No Fixed Yes Default Wall MustMatch No -
Name Minor1 MaxWidth 4 Delimiter - Wcmatch * Optional Yes Fixed Yes Default
Iden MustMatch No - Name Minor2 MaxWidth 4 Delimiter - Wcmatch * Optional
Yes Fixed Yes Default Text MustMatch No - Name Status MaxWidth 1 Delimiter -
Wcmatch * Optional Yes Fixed Yes Default N MustMatch No * *d - Discipline
Designator 0 1 A Architectural *+ D Architectural Demolition E Architectural
Elements F Architectural Finishes G Architectural Graphics I Architectural
Interior J Architectural (User Defined) K Architectural (User Defined) P
Architectural Paving S Architectural Site T Architectural Transportation *-
B Geotechnical *+ J Geotechnical (User Defined) K Geotechnical (User
Defined) *- etc, etc, etc.

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

Post to forums  

Autodesk Design & Make Report

”Boost