dimstyles/autolayer

Discussion in 'AutoCAD' started by Leothebuilder, Mar 16, 2005.

  1. Hi there....

    My office is about to change procedures upon my recommendation.
    They used to put all annotations and dimensions in paper space sheets.
    That way, if something was changed in the x-ref base floor plan, you had to
    go into numerous other drawings to update the annotations and dimensions.

    We are now considering placing everything in the xref base drawing.
    It's simple to set up a few layer states to make it easy to work on just the
    floor
    plan, or the ceiling plan, or the enlarged floor plans.

    We have to set up a few more layers to duplicate dimensions and annotations
    at different scales etc.

    Is there a way to force these dimensions and annotations etc. onto their
    correct
    layers set up for the various scales. At the moment we are using auto-layer
    dvb
    but that only works to force dimensions or notes to the specific layer.


    Having to use more than one dimension or text/note layer, how would one
    go about this ? Anyone have a similar set-up that works ?

    T.I.A.

    Leo the builder
     
    Leothebuilder, Mar 16, 2005
    #1
  2. The only way I know is with visual lisp reactors, the other one is that if you are using AutoCAD 2005, set the pre-defined layers for the dimensions and inside the command icon define each command with your desired layer, maybe from there you can have different palettes for each dimstyle you going to use.... have not done myself.

    LE.
     
    Luis Esquivel, Mar 16, 2005
    #2
  3. Leothebuilder

    OLD-CADaver Guest

    <<We are now considering placing everything in the xref base drawing. It's simple to set up a few layer states to make it easy to work on just the floor plan, or the ceiling plan, or the enlarged floor plans. >>

    Bad move, IMO, unless you're planning on NEVER going to 3D. But if you may someday consider 3D, annotation in PS goes a long way in reducing the abundance of annotation layers required.

    But to your question. Before the days of reactors, we built a couple of sub-functions for layer and style control and prefixed every button and menu selection and every lisp shorthand with them. Something like this:

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;; Set Current Layer to TEXTSTYLE name
    (defun txstla ()(SETVAR "CMDECHO" 0)
    (setq txst (strcat "txt" (rtos (getvar "dimscale") 2 0))) ;;;;;Create the name
    ;;;;;;;Make the style
    (if (/= (tblsearch "style" txst) nil)
    (command "textstyle" txst)
    (command ".style" txst "romans" (* (getvar "dimscale") 0.1) "0.7" "" "" "" "")
    )
    ;;;;;;;Make the layer
    (if (= (tblsearch "layer" txst) nil)
    (command "_layer" "m" txst "")
    (command "_layer" "t" txst "s" txst "")
    )
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;; Set Current Layer to DIMSTYLE name
    (defun dmstla ()(SETVAR "CMDECHO" 0)
    (setq dmst (strcat "dim" (rtos (getvar "dimscale") 2 0))) ;;;;;Create the name
    ;;;;;;;Make the layer
    (if (= (tblsearch "layer" dmst) nil)
    (command "_layer" "m" dmst "")
    (command "_layer" "t" dmst "s" dmst "")
    )
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;; Set Current DIMSCALE and DIMSTYLE name
    (defun C:DSC ()
    (command ".undo" "begin")
    (setq dscale (getvar "dimscale"))
    (if (setq ndscale (getdist (strcat "Enter New DIMSCALE <" (rtos dscale) ">: ")))
    (setq dscale ndscale))
    (command ".dim1" "dimscale" dscale)
    (txstla)(dmstla) ;;;;;Make the layers and style names
    (command "dimtxsty" txst) ;;;;;Set DIM text to text style
    (command "dim1" "save" dmst "y") ;;;;;Save the DIMSTYLE
    (command ".undo" "end")
    (princ)
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    EVERY place in the menu where TEXT/MTEXT commands can be issued is prefixed with (TXSTLA) and EVERY place where a dim can be placed is prefixed with (DMSTLA). Using the function DSC above to set the dimscale, creates the associated styles and layers.
     
    OLD-CADaver, Mar 16, 2005
    #3
  4. But to your question. Before the days of reactors,

    What are you guys using, today?
     
    Luis Esquivel, Mar 16, 2005
    #4
  5. Leothebuilder

    OLD-CADaver Guest

    Currently we're using a method similar to the one posted. Until just recently, we still had contracts working in R14, and rather than have two totally different setups, I chose to leave it as alone as possible. We are currently rebuilding many of our older routines to take advantage of reactors, ActiveX control, Vlisp and many other whiz-bang features.
     
    OLD-CADaver, Mar 16, 2005
    #5
  6. I quit on trying to sell software.... and I wrote a program named
    "drawhelp".... and is a shame to let it die just like that.... if you want a
    copy at least just to see what can be done.... let me know, no compromise at
    all.... [it is made with vlisp reactors, odcl and some arx and it is
    compiled as a vlx]

    LE.
    recently, we still had contracts working in R14, and rather than have two
    totally different setups, I chose to leave it as alone as possible. We are
    currently rebuilding many of our older routines to take advantage of
    reactors, ActiveX control, Vlisp and many other whiz-bang features.
     
    Luis Esquivel, Mar 16, 2005
    #6
  7. You could set up a Screen Menu in separate sections for each scale you would
    use. Users would pick a scale from an initial list, and that would call up
    a sub-menu (with a label at the top for the chosen scale), in which each
    annotation or dimension menu item could start with a layer setting, and call
    for a text or dimension style, appropriate to the scale. Each item would
    end with a call to return that scale-specific screen sub-menu, so the
    choices would all be there again, rather than the sub-menu appropriate to
    the last command that happened along the way. And each sub-menu would have
    an item to return you to the scale-selection list for changing to work on
    annotations for a different scale. This would be better than pull-downs,
    since the sub-menus would not disappear when you've picked something, so you
    wouldn't have to navigate through layers to get back to the right list for
    each annotation.

    If the number of annotation types isn't too large (for example, if you don't
    need ALL the dimensioning possibilities), you make a separate toolbar for
    each scale, again with each button starting with a layer and style setting.
     
    Kent Cooper, AIA, Mar 16, 2005
    #7
  8. Leothebuilder

    OLD-CADaver Guest

    We will be moving to R2006 sometime later this year and are currently in R2002. Will the compilation work in R2002? If so, I'd love to see it.
    Email:
    rculp*at*CBIepc*dot*com
     
    OLD-CADaver, Mar 16, 2005
    #8
  9. Leothebuilder

    Gary Fowler Guest

    I am interested in it.
    I liked your door routine. Have not tried your other programs.

    --
    Gary Fowler - Architect



     
    Gary Fowler, Mar 16, 2005
    #9
  10. I am interested in it.
    Let me see what can I do....
     
    Luis Esquivel, Mar 16, 2005
    #10
  11. Thanks for all the replies.

    I will have to read them all more carefully and absorb the info you
    guys gave me.

    The one from Kent sounds good, because it looks to me reasonably
    easy to set up and maintain.
    All we are looking for is probably two dimstyles and layers and two
    text styles and layers.

    Old Cadaver....I will look more into your suggestion too...
    And no...in what we do 3d will be out of the question for some time,
    so no problem there...

    And Luis...I would very much like to see your program too...and if
    I can implement or use it I will be happy to offer some compensation
    for your time...

    Leo the builder
     
    Leothebuilder, Mar 17, 2005
    #11
  12. I am interested in it.

    Sent....
     
    Luis Esquivel, Mar 17, 2005
    #12
  13. Sent....
     
    Luis Esquivel, Mar 17, 2005
    #13
  14. And Luis...I would very much like to see your program

    Post here your e-mail....
     
    Luis Esquivel, Mar 17, 2005
    #14


  15. Thanks.......


     
    Leothebuilder, Mar 18, 2005
    #15
  16. Leothebuilder

    Gary Fowler Guest

    Played with it last night. Luis good job, I like the overall design, and
    functionallity
    of your program. I was really impressed in how you got your tool bar icon
    image
    to change back and forth....how did you do that?
     
    Gary Fowler, Mar 18, 2005
    #16
  17. Leothebuilder

    OLD-CADaver Guest

    Sorry Luis, I haven't yet rec'd the email. Is the attachment and EXE? Our office firewall prohibits the recpt of EXE's and file larger than 1Mb.
     
    OLD-CADaver, Mar 18, 2005
    #17
  18. Leothebuilder

    Gary Fowler Guest

    Aslo, will the arx files work for 2006?
     
    Gary Fowler, Mar 18, 2005
    #18
  19. oh...

    it is an exe and 1.33MB it is inside of a zip

    can I change the extension and that would work?
     
    Luis Esquivel, Mar 18, 2005
    #19
  20. will the arx files work for 2006?


    I guess so, they mentioned that is no change on that.

    As soon I got my AutoCAD 2006, will verify...


    LE
     
    Luis Esquivel, Mar 18, 2005
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.