Menu for creating standard layers
I currently have a menu for creating layers. It was created prior to CUI's. The MNU file wasn't too difficult to make the changes to the colors or lineweights that were hard coded into the menu.
I am working on updating the now CUI file with some updated layer colors (plot using CTB) / lineweights. I would like to remove the colors / linetypes from the menu file.
I was thinking of an Excel file to hold all of the information, which would help in future changes. I'm not quite sure on the connection of that and the decrease in speed for such a connection.
Anyone have any suggestions on this? The seperate file does not have to be an Excel file. It could be a database, a regular text file or whatever. The current system works. It just makes updating the colors / linetypes a pain.
TIA
RE: Menu for creating standard layers
I would agree with moving variable information outside the CUI file.
Define a function in your MNL file and call the function in the CUI file.
Then you can go in and edit the MNL anytime without having to deal with the CUI editor.
RE: Menu for creating standard layers
Hi Opie !
here is how I do
I run a lispfile from my menu with one argument like this
^C^C^P(c:MyLayers "LayerName");^P
Inside the lispfile is a list with more than 300 LayerNames and colors and linetypes, and
a function that load linetypes if necessary
a function that create one or all layer if they do not exist
a function that redefine the layer if it exist ( and handle freeze/thaw, lock/unlock, off/on, warnings )
and the program that set the Layer current if possible.
The argument, the LayerName is the key in the list to find the associated color and linetype.
This works really great and layers are set on demand before you draw your object
and there is no problems with purged linefonts or layers.
But there is one limit, the list can not store unlimited layers, and I am really close to the cutting end. . .
and when or if that happens I just rewrite the list to a text file and use it in the same manner as the list.
: ) Happy Computing !
kennet
RE: Menu for creating standard layers
Quote:
Originally Posted by Opie
Currently, I supply the routine which creates my layers with the layer name, color, and linetype. Those three variables are within the CUI.
Should I use the lisp routine to link to a text or excel file and extract the color and linetypes based on the layer name? That's what I am getting at I guess.
IMO - it depends on who needs to update the list and how often.
If only certain people will have access to this list, then I don't see why you couldn't just keep the list embedded in the LSP file.
If many people (some who do not know lisp) need access to this list, then maybe keeping the list as an external CSV file is the right thing to do.
RE: Menu for creating standard layers
Quote:
Originally Posted by kennet.sjoberg
But there is one limit, the list can not store unlimited layers,
What is the limit? Do you mean number of items in a list?
This is only limited by the amount of physical memory.
RE: Menu for creating standard layers
Quote:
Originally Posted by Opie
. . . It makes it a little more difficult in updating that information.
No, it is easy to update for me, but the file is write protected in a company server location.
the list looks like :
PHP Code:
(setq LayList (list
(list "0" 7 "CONTINUOUS" )
(list "_xref" 9 "CONTINUOUS" )
(list "MyLayer01" 1 "CENTER3" )
.
.
.
)
But as I mentioned, you can rewrite the list to a file. . .
: ) Happy Computing !
kennet
RE: Menu for creating standard layers
Quote:
Originally Posted by rkmcswain
What is the limit? Do you mean number of items in a list?
This is only limited by the amount of physical memory.
I really do not know, the physical memory is oversized,
but if the list is to long, it will be cutted of, and not allways in the same position.
InfoLink
: ) Happy Computing !
kennet