See the top rated post in this thread. Click here

Page 5 of 6 FirstFirst 123456 LastLast
Results 41 to 50 of 56

Thread: Button creation to import Layers

  1. #41
    100 Club jpduhon's Avatar
    Join Date
    2005-10
    Posts
    153
    Login to Give a bone
    0

    Question Re: Button creation to import Layers

    I would like to bounce this idea out there and get some input. What I’ve done for my users is this:

    First drawings are started with a template that contains all office standard layers. Then if layers are purged there are several options. First I used the Layers2.lsp (available from the exchange) and recompiled it to point to several different CSV files (one for plan layers, section layers, site layers, etc.) with different commands (laymakeplan, laymakesect, etc.) I created a tool palette that contains (among other things) buttons to repopulate drawings with these sets of layers. I also created a pull-down with subcategories that can be browsed and layers can be added one by one as needed or repopulated in groups like the tool palette buttons. It was a good bit of work up front but the CSV files are read-only on the server and the pull-down is in the enterprise CUI so I can change this at any time and it is nicely portable to future Acad versions. We are also beginning to use standards files to keep things in line.


    I have two gripes with this method:

    1 – I took a lot of time entering the description for every layer into the template but the lisps and the macros in the pull-downs don’t support the description field.

    2 – When the layers are repopulated any changes made to the layer for graphic reasons are lost. This typically isn’t a problem but I have some power users that like to use layers for multiple purposes and this gets in their way.

    Can you add descriptions with VBA code? I have yet to learn VBA.

  2. #42
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    1

    Default Re: Button creation to import Layers

    Quote Originally Posted by jpduhon
    <SNIP>

    I have two gripes with this method:

    1 - I took a lot of time entering the description for every layer into the template but the lisps and the macros in the pull-downs don't support the description field.

    2 - When the layers are repopulated any changes made to the layer for graphic reasons are lost. This typically isn't a problem but I have some power users that like to use layers for multiple purposes and this gets in their way.

    Can you add descriptions with VBA code? I have yet to learn VBA.
    Hi

    For starters try the following thread...

    Adding a layer description throught command line

    Have a good one, Mike

  3. #43
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    285
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    I am looking into how we did it, but you can write script files for different uses (removal layers, new construction layers etc.) then your button macro would just be: ^C^C_script

    As long as you keep all your script files in the same folder it will open to the last used folder everytime.

    Obviously, it takes some time to set it up originally but it works well for us.

    Cheers.

  4. #44
    100 Club jpduhon's Avatar
    Join Date
    2005-10
    Posts
    153
    Login to Give a bone
    1

    Default Re: Button creation to import Layers

    Quote Originally Posted by Mike.Perry
    Hi

    For starters try the following thread...

    Adding a layer description throught command line

    Have a good one, Mike
    Thanks, Mike. After much frustration (see my posts on that thread) I figured out how to use the vla-put* function for the lisp routine. For our pulldowns I think that I will keep the -layer macros inplace.

    Thanks to all here. Big help!!

  5. #45
    I could stop if I wanted to johan d's Avatar
    Join Date
    2006-01
    Location
    Belgium
    Posts
    287
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    what we do is just inserting a dwg with all the layer defined (through a menu), but before inserting it cancel the insert command.
    This way the layers are inserted but no dwg is inserted

    the line is
    [&Insert Group Layers]^c^c-insert;Group_Layers.dwg ^c^c

  6. #46
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by jpduhon
    1 – I took a lot of time entering the description for every layer into the template but the lisps and the macros in the pull-downs don’t support the description field.
    I have a little Lisp routine that reads our layer names, breaks them down to their constituent parts and strcats a description together, then adds this to the Description field in the Layer manager. If you Layers have some sort of delimiting character, maybe this sort of approach would be of use to you?

  7. #47
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    HERE IS A ANOTHER WAY TO DO WHAT YOU ARE TRYING TO DO WITH AN BUTTON
    FOR INSTALLING YOUR DEFAULT LAYERS.

    WHERE I WORK AT, WE HAVE A DIRECTORY CALLED P:AUTOCAD 2006 SUPPORT\CLIENT LAYERS PROTOTYPE.
    THIS WHERE WE KEEP ALL THE LAYER SETUPS WHICH ARE ACCESSIBLE BY PULL DOWN.
    THE ABOVE DIRECTORY IS IN THE AUTOCAD SUPPORT FILE SUPPORT PATH IN OPTIONS.
    (P: IS OUR SERVER).

    NEXT ADD THE LISP FILE BELOW, THIS WILL HELP YOU BY USING "I" AS A COMMAND
    FOR INSERTING BLOCKS BY BUTTONS OR THE COMMAND PROMPT, MAKE SURE THAT YOU PUT THIS IN
    A FILE THAT LOADS AUTOMATICALLY EVERY TIME YOU START AUTO CAD

    (DEFUN C:I ()
    (COMMAND "-INSERT")
    (PRINC)
    )



    WHEN YOU MAKE YOUR BUTTON ADD THE STATEMENT BELOW TO THE MACRO COMMAND LINE.
    MAKE SURE YOU HAVE ONE BLANK SPACE AFTER THE P, THIS WILL ACT AS ENTER
    WHERE IT SAYS ASTPROTOMAIN YOU WILL PUT YOUR FILE NAME.


    ^C^CI;ASTPROTOMAIN;400,400;;;;z;e;E;L;;Z;P

    THE WAY THIS COMMAND WORKS IT WILL INSERT THE BLOCK AT 400,400
    IT WILL THE GO THROUGH THE DEFAULTS OF THE INSERT COMMAND,(THE SIMI-COLONS ACT AS
    HARD ENTER) THEN Z CALL FOR ZOOM COMMAND AND ZOOM EXTENTS, THE CAPITOL E CALLS
    FOR THE ERASE COMMAND AND L CALLS FOR LAST AND ERASES THE BLOCK (WATCH CAREFULLY AND YOU
    SEE THE HAPPEN ON SCREEN AS FLASH) THEN NEXT CALL FOR ZOOM AND BACK TO PREVIOUS SCREEN SIZE
    YOU HAD BEFORE INSERTING THE BLOCK

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

    Default Re: Button creation to import Layers

    Quote Originally Posted by vtmiii
    HERE IS A ANOTHER WAY...
    Hi vtmiii, (sorry, I don't know your real name)

    I know most of us set our Caps Lock on. For future reference, it's best not to post a message using all Caps Lock ie. UPPERCASE as it makes it look like you are shouting. It also makes it a little more difficult to read.

    Thanks for your understanding.

    Richard
    Forum Moderator
    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. #49
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    oops sry for the caps i was at work when i typed it up in autocad (my caps are turned on for do cad drafting). did not realize what i did till i got home frome work
    .

  10. #50
    Woo! Hoo! my 1st post
    Join Date
    2007-07
    Posts
    1
    Login to Give a bone
    0

    Smile Re: Button creation to import Layers

    Quote Originally Posted by srb
    No, they didn't work either. I also tried it by taking out the spaces in the subdir name and the file name. It still won't get past just the network drive letter:

    Command: _.-Insert
    Enter block name or [?]: *"L:
    This should do the trick for you:

    ^C^C_-insert;"L:/Data/Drawing Templates/Design Center.dwg";0,0;1;1;0
    Last edited by jpilato; 2007-07-23 at 10:38 AM. Reason: syntax incorrect

Page 5 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Import Family Parameter Set button.
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2013-07-24, 11:22 AM
  2. Button Creation for Scaling Viewports
    By cwjean76 in forum AutoCAD Customization
    Replies: 5
    Last Post: 2008-06-12, 09:49 PM
  3. Importing Layers Button?
    By Kal_digital in forum AutoCAD Customization
    Replies: 14
    Last Post: 2008-05-01, 07:23 PM
  4. Replies: 0
    Last Post: 2005-11-23, 01:22 PM
  5. Layers button
    By bob.kalsi66006 in forum ACA General
    Replies: 10
    Last Post: 2005-08-30, 11:47 AM

Posting Permissions

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