See the top rated post in this thread. Click here

Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 56

Thread: Button creation to import Layers

  1. #21
    I could stop if I wanted to LanceMcHatton's Avatar
    Join Date
    2002-04
    Location
    Las Vegas, NV, USA
    Posts
    303
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by srb
    Continuing on that theme, then I assume you could also add on/off, freeze/thaw, etc. information to the strings in the lisp routine?

    For example:

    "m" "C-DRWY" "c" "21" "" "l" "continuous" "F" "LO" ""
    Absolutely. The only thing you can't do, as far as I know, is edit the layer description. I am told, however, that my way still isn't necessarily the best way to go about the whole thing. There should be a way to use the standards checker in AutoCAD to check and fix drawings per the standards. I still haven't checked it out yet but it is very high on my to-do list.

  2. #22
    100 Club bmonk's Avatar
    Join Date
    2005-11
    Location
    ...1st & 1st...Im at the nexis of the universe...
    Posts
    159
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Another option would be to go to your options (right-clicking the command line) and then to the 1st tab "Files", and then expand the Support File Search line and add the drive and folder in which you are searching for the drawing. I created a Custom folder to stick all my customized files, bmp's, drawings, etc.

    Anyway, by doing this, you can simply use ^C^C_-insert;Drawingname;;;;

    Hope that helps.

  3. #23
    I could stop if I wanted to de-co1's Avatar
    Join Date
    2005-07
    Location
    Jhb - ZA
    Posts
    274
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    I have been following this with interest.

    For me this works. We are on LT 2000, and the button, when pressed, inserts the 'blank' drawing and all it's layers, however, once purged, you can't re-insert all the layers, as the block already exists in the drawing.

    Is there a way to get around this...?

    With LT, obviously no lisp...

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

    Default Re: Button creation to import Layers

    Quote Originally Posted by de-co1
    I have been following this with interest.

    For me this works. We are on LT 2000, and the button, when pressed, inserts the 'blank' drawing and all it's layers, however, once purged, you can't re-insert all the layers, as the block already exists in the drawing.

    Is there a way to get around this...?

    With LT, obviously no lisp...
    You would need to delete the block and purge that block. I am not sure if the procedures to insert the block using a macro that just inserts the block definition and not the block. kennet explains how to do it with lisp, unfortunately, I do not have much time to test those procedures in a macro.

    HTH
    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

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

    Default Re: Button creation to import Layers

    Quote Originally Posted by de-co1
    For me this works. We are on LT 2000, and the button, when pressed, inserts the 'blank' drawing and all it's layers, however, once purged, you can't re-insert all the layers, as the block already exists in the drawing.

    Is there a way to get around this...?

    With LT, obviously no lisp...
    Hi

    If you use the solution offered in this post ( RE: Button creation to import Layers ), you will not experience "<BlockName> is already defined. Do you want to re-define it.".

    Why? - The <BlockName> is not added to the drawing database.

    Have a good one, Mike
    Last edited by Mike.Perry; 2005-12-24 at 01:36 PM. Reason: Correct my poor grammar.

  6. #26
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Yet another way would be to run a script that does the same as the lisp. Scripts work equally well in LT and full acad.

  7. #27
    I could stop if I wanted to de-co1's Avatar
    Join Date
    2005-07
    Location
    Jhb - ZA
    Posts
    274
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by Opie
    You would need to delete the block and purge that block. I am not sure if the procedures to insert the block using a macro that just inserts the block definition and not the block.
    Yes, my problem is the same. I can't delete a drawing that doesn't essentially exist. I have looked at Kennet's suggestion - does that work in LT 2000?


    Quote Originally Posted by Mike.Perry

    If you use the solution offered in this post ( RE: Button creation to import Layers ), you will not experience "<BlockName> is already defined. Do you want to re-define it.".

    Why? - The <BlockName> is not added to the drawing database.
    I will have a look at the issue again when I get back to work, but if I can remember correctly, it was asking to redefine it... I'm not entirely sure, but will get back to you.


    Quote Originally Posted by jaberwok

    Yet another way would be to run a script that does the same as the lisp. Scripts work equally well in LT and full acad.
    I thought scripts could only be run on opening ACAD...

    Can one assign scripts to buttons?

  8. #28
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    Quote Originally Posted by de-co1
    I thought scripts could only be run on opening ACAD...

    Can one assign scripts to buttons?
    Scripts can be run at any time; command = SCRIPT, alias SCR. (surprise, surprise).
    The command can be called by a button but, since it calls the standard File\Open dialogue, you will have to fiddle a bit (Set Filedia to 0, etc.).

  9. #29
    I could stop if I wanted to de-co1's Avatar
    Join Date
    2005-07
    Location
    Jhb - ZA
    Posts
    274
    Login to Give a bone
    0

    Default Re: Button creation to import Layers

    OK... In response to Mike's previous post...

    This is what I use as my button macro;

    ^C^C^C^C_.-Insert;"C:/aa-Dir/Blocks/Layers.dwg";0,0;1;;0;

    You will notice I added an extra semi-colon after the number one in order to get around the instruction stopping on 'Enter Y Scale Factor <use X Scale Factor>'

    It inserts the 'blank' drawing with all the layers, only at the first attempt. If I purge, it doesn't work again. I checked under my listing of blocks, and the drawing 'Layers.dwg' is in fact added to the drawing's block database. I cannot delete this, as there are no entities to select for deletion.

    Can I add instructions to the macro to redefine the block?

    How can I get rid of the block if there isn't anything to select?

    How would I go about incorporating this into a script, and if I do that, will I not then have the same problem - once run the first time, it will not work a second time?

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

    Default Re: Button creation to import Layers

    Quote Originally Posted by de-co1
    OK... In response to Mike's previous post...

    This is what I use as my button macro;

    ^C^C^C^C_.-Insert;"C:/aa-Dir/Blocks/Layers.dwg";0,0;1;;0;
    Hi

    Try the button macro I offered originally ( please see here ) eg

    Code:
    ^C^C^C^C_.-Insert;*C:/aa-Dir/Blocks/Layers.dwg;0,0;1;0;
    Note the asterisks "*" in front of the drawing file path.

    Have a good one, Mike

Page 3 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
  •