Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Menu for creating standard layers

  1. #1
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,434
    Login to Give a bone
    0

    Default 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
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  2. #2
    Super Moderator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,695
    Login to Give a bone
    0

    Default 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.
    R.K. McSwain | CAD Panacea |

  3. #3
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,434
    Login to Give a bone
    0

    Default Re: Menu for creating standard layers

    Quote Originally Posted by rkmcswain
    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.
    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.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #4
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default 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
    Last edited by kennet.sjoberg; 2006-04-20 at 08:50 PM.

  5. #5
    Super Moderator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,695
    Login to Give a bone
    0

    Default 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.
    R.K. McSwain | CAD Panacea |

  6. #6
    Super Moderator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,695
    Login to Give a bone
    0

    Default 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.
    R.K. McSwain | CAD Panacea |

  7. #7
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,434
    Login to Give a bone
    0

    Default Re: Menu for creating standard layers

    Quote Originally Posted by rkmcswain
    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.
    I'm been giving that duty to update almost anything technical. Woohoo

    I could do it as kennet mentions. May be a good idea. I just don't like placing large amouns of data within a program. It makes it a little more difficult in updating that information.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,434
    Login to Give a bone
    0

    Default Re: Menu for creating standard layers

    Quote Originally Posted by kennet.sjoberg
    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
    Thanks kennet. That is what I was thinking about. I just don't really want to tackle the task right now. I am reworking the menu at the same time and making sure the correct colors are correct.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  9. #9
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default 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"         "CONTINUOUS"  )
    (list 
    "_xref"     "CONTINUOUS"  )
    (list 
    "MyLayer01" "CENTER3"     )
    .
    .
    .

    But as I mentioned, you can rewrite the list to a file. . .

    : ) Happy Computing !

    kennet
    Last edited by kennet.sjoberg; 2006-04-20 at 09:26 PM.

  10. #10
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default 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
    Last edited by kennet.sjoberg; 2006-04-20 at 09:24 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. Export layers using 'aec uk cad standard' layers
    By Parkinson in forum Revit - In Practice
    Replies: 3
    Last Post: 2013-06-03, 02:50 AM
  2. Creating a layer manager button for standard layers......
    By Kal_digital in forum AutoCAD Customization
    Replies: 8
    Last Post: 2008-02-26, 09:51 PM
  3. Standard Layers
    By jenniferchavez in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2007-09-27, 07:16 PM
  4. Convert Layers to Standard
    By rhayes.99001 in forum ACA General
    Replies: 1
    Last Post: 2007-09-18, 10:28 PM
  5. National CAD Standard Layers
    By rhayes.99001 in forum ACA General
    Replies: 12
    Last Post: 2006-09-30, 06:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •