Linetype predicament

Discussion in 'AutoCAD' started by ctindall, Nov 11, 2004.

  1. ctindall

    ctindall Guest

    I am trying to create a script that will insert a Smoke/Fire Damper symbol after picking two sides of a duct. I would like to create a linetype so that there is a short dash in the center of the line....
    ___ _ ___

    Even if it is a large duct...
    _______________ _ _______________

    Is this possible? Any suggestions on another way to accomplish this? (Maybe a block inserted at the center with scaling in one direction only)
     
    ctindall, Nov 11, 2004
    #1
  2. I don't think it's possible with a linetype, if the range of duct width is
    that large. Either the shorter ones will come out continuous, or the longer
    ones will have more than one dash cycle.

    You could pick one side of the duct using Osnap Nearest, then pick the other
    side using Osnap Perpendicular, and save both those points. Then change the
    User Coordinate system to be based around the first one and rotated so the X
    direction is toward the other one.

    Measure the distance between the points, and save half the value as the X
    coordinate (in the new UCS) of the midpoint. If you want the dash and the
    gaps the same size, calculate one-and-a-half times that size and subtract it
    from that X coordinate. Then do two break commands, starting there and
    moving up the X coordinate each time by the dash/gap size. The Y coordinate
    of all four points would be zero.

    Then set the UCS back to what it was before.

    The block idea with scaling for the duct width is easy enough, if it's
    acceptable that the dash and gaps in the center would vary in size, too
    (wouldn't look like your "sketch"). But it would be easier if you don't
    insert it at the center. Draw the block horizontally, with a total length
    of one drawing unit, with its base point at the left end. Then use that
    first Nearest point as the insertion point, the distance to the
    Perpendicular point as the scale factor, and the direction to there for the
    rotation. [And with a simple line-based block, you could scale it in both
    directions if that's easier.]

    Other cockamamie ideas:
    A middle-justified piece of text consisting of a hyphen or rotated capital
    I, masked.
    A line, two concentric circles, trim the line between the circles, erase the
    circles.
     
    Kent Cooper, AIA, Nov 12, 2004
    #2
  3. Duh... It would also help if you DREW A LINE between those two saved
    points, before breaking it.
    --
    Kent Cooper, AIA


    ...
    .....
    .....
     
    Kent Cooper, AIA, Nov 12, 2004
    #3
  4. ctindall

    Rick Keller Guest

    Try putting a * in front of the command this should repeat the command over
    and over.

    [Supply
    Damper]*^C^C_-layer;make;M-HVAC-SUPP-ACCS;color;132;;ltype;continuous;;;^C^C-insert;"H:/MCP
    BS3 Standards/Blocks/Mech/Symbols/SFD.dwg";x;\\

    Rick
     
    Rick Keller, Nov 15, 2004
    #4
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.