A customization query.

Discussion in 'AutoCAD' started by Jamie Duncan, Jan 20, 2004.

  1. Jamie Duncan

    Jamie Duncan Guest

    I've reviewed complex linetypes and I feel that are interesting, but the
    potential for problems is vast (all related to ltscale factors resetting
    what you've drawn)

    We have a hatch for insulation that is handled in a lisp - it's not that
    great looking but it consumes little .dwg memory, it can be stretched
    longitudinally (associative). We also have routines for fencelines etc. I
    was thinking that complex linetypes would be great for these items, but
    here's the secnario:

    Drawing with multiple scales (1:5, 1:10, 1:20, 1:100 & 1:300). User works
    on a 1:5 detail - but forgets to reset dimstyle to 5-dimstyle for example
    ie ltscale 2540 for eg. Lisp routine handles that - ie asks user to pick
    two lines for eg. Now when we set up viewport the batt is all wrong and
    user has to go back and fix all the batt

    Same with all of these ltypes.

    Any comments on how you people handle these issues in your customization
    suite?

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan, Jan 20, 2004
    #1
  2. What I do is save drawing scales and any info in the dictionary or the drawing.
    I have a routine that makes it super easy.

    So if the user runs a command that needs one of the saved values, it checks for it.
    If the value does not exist, it gives the user a dialog box asking for the value needed.
    That way the user sets it once and forgets about it.
    If a drawing is not set up, it gets put in his face and he has to set a value.

    The routine then forces the dimscale or whatever based on the value.

    No better way to do it in my opinion. You only want to nag the user once per drawing.
    Even if you manipulate what the default value is in the dialog, you should make the user think about setting things up
    correctly the first time.

    I can provide code if you want, please email me using
    jmaeding at hunsaker dot com (switch: at = @, dot = .)
    These are fun routines and actually very simple for what you get from them.
    Let me know if thats what you were asking...
    thx

    "Jamie Duncan" <>
    |>I've reviewed complex linetypes and I feel that are interesting, but the
    |>potential for problems is vast (all related to ltscale factors resetting
    |>what you've drawn)
    |>
    |>We have a hatch for insulation that is handled in a lisp - it's not that
    |>great looking but it consumes little .dwg memory, it can be stretched
    |>longitudinally (associative). We also have routines for fencelines etc. I
    |>was thinking that complex linetypes would be great for these items, but
    |>here's the secnario:
    |>
    |>Drawing with multiple scales (1:5, 1:10, 1:20, 1:100 & 1:300). User works
    |>on a 1:5 detail - but forgets to reset dimstyle to 5-dimstyle for example
    |>ie ltscale 2540 for eg. Lisp routine handles that - ie asks user to pick
    |>two lines for eg. Now when we set up viewport the batt is all wrong and
    |>user has to go back and fix all the batt
    |>
    |>Same with all of these ltypes.
    |>
    |>Any comments on how you people handle these issues in your customization
    |>suite?

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jan 20, 2004
    #2
  3. Jamie Duncan

    Jamie Duncan Guest

    here's the sitcom.

    we have the setup thingy yada yada yada...

    We also have a reactor that sets ltscale and psltscale automatically.
    Therefore if a user switches to pspace, ltscle and psltscale are set to 1
    if user switches back to model
    ltscale = unit factor x dimscale

    This means that these custom linetypes are being switched around all the
    time..

    Now we love this reactor - we never get a plot back from the outside
    plotters with ltscale issues,m and for the users the linteypes always appear
    right on the screen. But what happens if user creates a complex line for a
    1:100 scale, but it is for a 1:10 detail? Will the linetypes not b all
    kerflooey? I mean I have to apply a celtscale to this batt thing to get it
    to the right width, whereas all other lines are celtscale = 1.

    So does this mean I need 10 to 12 batt lintetypes?

    Just curious...


    Jamie Duncan

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
    make the user think about setting things up
     
    Jamie Duncan, Jan 20, 2004
    #3
  4. wait, are you saying you have multiple ltype defeinitions for the same looking linetype?
    Why bother, you can set them up to look correct at a scale of 1 and use ltscale to scale them.
    If you set psltscale to 1, acad takes care of all the different zoom factors in the viewports.
    Don't let people sell you on using psltscale set to 0, if thats what you are doing.
    You need to set things up as if you have no idea what scale they use. Then allow the user (or a tool) to set the
    ltscale and it all works.

    I am wondering if I understood the original problem correct. I would go crazy with scale specific linetypes.


    "Jamie Duncan" <>
    |>here's the sitcom.
    |>
    |>we have the setup thingy yada yada yada...
    |>
    |>We also have a reactor that sets ltscale and psltscale automatically.
    |>Therefore if a user switches to pspace, ltscle and psltscale are set to 1
    |>if user switches back to model
    |>ltscale = unit factor x dimscale
    |>
    |>This means that these custom linetypes are being switched around all the
    |>time..
    |>
    |>Now we love this reactor - we never get a plot back from the outside
    |>plotters with ltscale issues,m and for the users the linteypes always appear
    |>right on the screen. But what happens if user creates a complex line for a
    |>1:100 scale, but it is for a 1:10 detail? Will the linetypes not b all
    |>kerflooey? I mean I have to apply a celtscale to this batt thing to get it
    |>to the right width, whereas all other lines are celtscale = 1.
    |>
    |>So does this mean I need 10 to 12 batt lintetypes?
    |>
    |>Just curious...
    |>
    |>
    |>Jamie Duncan

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jan 21, 2004
    #4
  5. Jamie Duncan

    Jamie Duncan Guest

    the problem is with complex linetypes. These objects are width dependant
    (like the batt insulation - sometimes you 4", sometime 8" etc - all on the
    same drawing) to achieve this you have to manipulate the celtscale
    (celtscale*ltscale = width needed) but if ltcale varies - so does the
    appearance of these complex linetypes. Thus is the detail is 1:5 - the user
    must first set the ltscale appropriately so that the correct celtscale will
    be used to get the required width of batting.

    And if the ltscale changes - everything looks bizarre on the screen
    (although the viewport will plot correctly)

    The upshot of all this is that complex linetypes are nice - but they only
    work if you have one scale on a drawing - not much use for us...



    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)



    Then allow the user (or a tool) to set the
    crazy with scale specific linetypes.
     
    Jamie Duncan, Jan 21, 2004
    #5
  6. I am not getting your problem, we do this kind of thing a lot and this is how it works:
    1) Only use celtscale if you need to show the same linetype as two different scales in one viewport.
    2) when in modelspace (tilemode 1), set the ltscale to that of the detail
    3) keep psltscale to 1 always
    4) when in paperspace, ltscale is always 1

    The only possible painful step is item 2. I think that is your whole question, how can this be done automatically.
    I started on a routine to toggle the tilemode. If you are in paperspace (tilemode 0) but your cursor is "in" a
    viewport, it detects the zoom factor of the viewport and switches the ltscale and dimscale to that number, then it
    switches tilemode and zooms to that viewports limits in ms.
    Would that help your problem?
    You have me interested now.
    thx


    "Jamie Duncan" <>
    |>the problem is with complex linetypes. These objects are width dependant
    |>(like the batt insulation - sometimes you 4", sometime 8" etc - all on the
    |>same drawing) to achieve this you have to manipulate the celtscale
    |>(celtscale*ltscale = width needed) but if ltcale varies - so does the
    |>appearance of these complex linetypes. Thus is the detail is 1:5 - the user
    |>must first set the ltscale appropriately so that the correct celtscale will
    |>be used to get the required width of batting.
    |>
    |>And if the ltscale changes - everything looks bizarre on the screen
    |>(although the viewport will plot correctly)
    |>
    |>The upshot of all this is that complex linetypes are nice - but they only
    |>work if you have one scale on a drawing - not much use for us...

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Jan 21, 2004
    #6
  7. Jamie Duncan

    Jamie Duncan Guest

    Dear James, I have posted to .pdf plots in the customer files - have a look.

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
    different scales in one viewport.
    question, how can this be done automatically.
    (tilemode 0) but your cursor is "in" a
    ltscale and dimscale to that number, then it
     
    Jamie Duncan, Jan 21, 2004
    #7
  8. Jamie Duncan

    Dave Lewis Guest

    not a solution but have you thought about using a minsert instead of a linetype
    then it would work regardless of ltscale. It would be easy to write a lisp to place
    it with a few mouse clicks.


    "Jamie Duncan" <>
    |>Dear James, I have posted to .pdf plots in the customer files - have a look.
     
    Dave Lewis, Jan 22, 2004
    #8
  9. Jamie Duncan

    Jamie Duncan Guest

    Currently we have routines to handles these things, and seeing how complex
    linetypes are fast and small, and easy to create I though here was a way to
    improve things. Unfortunately the unpredictable behaviour unless celtscale
    is always 1, and you have one ltscale, and you happen to create 6 or more
    batt sizes - they are unusable. They also defeat the basic idea of CAD,
    that is draw it once.


    --
    Jamie Duncan

    "How wrong it is for a woman to expect the man to build the world she wants,
    rather than to create it herself."
    - Anais Nin (1903-1977)
     
    Jamie Duncan, Jan 23, 2004
    #9
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.