Results 1 to 8 of 8

Thread: Setup Correct Layers,Dim Styles,Text Styles

  1. #1
    I could stop if I wanted to rhayes.99001's Avatar
    Join Date
    2005-11
    Location
    New Jersey
    Posts
    349
    Login to Give a bone
    0

    Default Setup Correct Layers,Dim Styles,Text Styles

    Is there a Lisp routine that will run the correct Layer setup based on the User input.
    I basicly what to have a routine that i can run to re-insert all layers for a startup DWG.

  2. #2
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    Quote Originally Posted by rhayes.99001
    Is there a Lisp routine that will run the correct Layer setup based on the User input.
    I basicly what to have a routine that i can run to re-insert all layers for a startup DWG.
    Requires more information. But have a look at the Layer Manager in Express Tools. You can export the layers from a drawing into an external file and import it back to any drawing.

    Regards,

    Abdul Huck

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    Quote Originally Posted by rhayes.99001
    Is there a Lisp routine that will run the correct Layer setup based on the User input.
    I basicly what to have a routine that i can run to re-insert all layers for a startup DWG.
    As opposed to just starting a new drawing from a template?

    Yes, what you are asking can be done.

    Are you wanting to keep these layer, dimstyle, and textstyle definitions stored in a DWG file? If so, just do that then insert this drawing whenever you need it. The downside to that is that any existing object properties will not be overwritten.

    To ensure that the end result matches your desires, you will need to define the layers, dimstyles, and textstyles on the fly using lisp.

    Here is an example. This creates a new layer named "text", and sets the linetype to "hidden".

    Code:
    (setq *layers* (vla-get-Layers
    		 (vla-get-ActiveDocument (vlax-get-acad-object))
    		   )
    )
    (setq new (vlax-invoke-method *layers* "Add" "text"))
    (vla-put-Linetype new "Hidden")
    R.K. McSwain | CAD Panacea |

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    Modify the template (*.dwt) file for your startup drawing. If it's not a startup drawing just insert it into one.

  5. #5
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    From a template you can also drag-n-drop layers into old files as needed.

    Or a script could work...

  6. #6
    I could stop if I wanted to rhayes.99001's Avatar
    Join Date
    2005-11
    Location
    New Jersey
    Posts
    349
    Login to Give a bone
    0

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    I have an Existing Drawing that I am currently working on.
    It has been purged and now I need some of those layers back.
    I want to run a lisp to re-load all the layers,dim & text styles that
    have been purged out and keep working on the same drawing file.

    Is there a better way to re-insert this info.???
    If I have a Template file how do I re-load into an existing drawing.???

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    Quote Originally Posted by rhayes.99001
    I have an Existing Drawing that I am currently working on.
    It has been purged and now I need some of those layers back.
    I want to run a lisp to re-load all the layers,dim & text styles that
    have been purged out and keep working on the same drawing file.

    Is there a better way to re-insert this info.???
    If I have a Template file how do I re-load into an existing drawing.???
    Use Design Center to import all the layers,dim & text styles from another drawing.

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

    Default Re: Setup Correct Layers,Dim Styles,Text Styles

    Quote Originally Posted by rhayes.99001
    I have an Existing Drawing that I am currently working on.
    It has been purged and now I need some of those layers back.
    I want to run a lisp to re-load all the layers,dim & text styles that
    have been purged out and keep working on the same drawing file.

    Is there a better way to re-insert this info.???
    If I have a Template file how do I re-load into an existing drawing.???
    one way is to use a macro that will insert the template as a block then delete it without removing the layer and text style info. Warning: this method will leave behind a lot of info from the template as well. Also your template would have to be saved as a dwg.
    Code:
    ^C^C_.-insert;"X:/CAD/TEMPLATE.dwg";^C^C_.-purge b;TEMPLATE;n;;;
    You can also try here for some more complex solutions. While there you can also check the bottom of the thread for similar posts.

Similar Threads

  1. 2015: Label Styles and multiple text layers
    By Iceberg in forum Civil 3D Styles Library
    Replies: 2
    Last Post: 2014-06-09, 03:21 PM
  2. layers, text styles, dim styles on tool palette
    By jledgewood in forum AutoCAD Customization
    Replies: 9
    Last Post: 2010-05-24, 03:30 PM
  3. Sharing standard Dimension styles, text styles, hatch patterns, etc
    By dhavalpatel_us337373 in forum AutoCAD General
    Replies: 1
    Last Post: 2007-02-02, 08:34 PM
  4. Link Text with Object Styles & Line Styles
    By Chad Smith in forum Revit Architecture - Wish List
    Replies: 4
    Last Post: 2004-07-15, 04:27 PM
  5. Almost too basic- text style + dimension styles-setup
    By sfickettj in forum ACA General
    Replies: 9
    Last Post: 2004-06-25, 02:16 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
  •