Results 1 to 2 of 2

Thread: Drawing Dimensions With Script

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2014-05
    Posts
    1
    Login to Give a bone
    0

    Default Drawing Dimensions With Script

    Hi everyone
    i wrote a script to draw 2 pLine and put dimension over them but i have problem with dim line offset.
    i dont understand effect of value given by command after picking start/end ponits of dimension.
    i've tried -1 or 0.5, but every time i load script place of dimension line is vary.
    my script is attached.
    thx for your help :smileywink:
    Code:
    orthomode
    0
    osmode
    0
    pline
    0,-1
    w
    0.03
    0.03
    6.894,-2.216
    
    
    pline
    6.894,-2.216
    w
    0.11
    0.11
    12.803,-3.257
    
    
    _dimaligned
    0,-1
    6.894,-2.216
    -0.2
    (command)
    (command)
    _dimcontinue
    12.803,-3.257
    (command)
    (command)
    _dimaligned
    0,-1
    12.803,-3.257
    -0.5
    (command)
    (command)

  2. #2
    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: Drawing Dimensions With Script

    Hi, welcome to AUGI.
    This took some playing around - my solution seems to be workable but it's not particularly elegant.


    Code:
    orthomode
    0
    osmode
    0
    pline
    0,-1
    w
    0.03
    0.03
    6.894,-2.216
    w
    0.11
    0.11
    12.803,-3.257
    
    _dimaligned
    0,-1
    6.894,-2.216
    @0,10
    _dimaligned
    0,-1
    12.803,-3.257
    @0,17
    
    The lines in green place the dimensions predictably. I'm working in millimetres so you'll want to experiment with different figures to replace the "10" and "17".
    The lines in blue and green also condense the dimensioning operations - I'm assuming that this still gives the result you want.
    Also, in case you're interested, the section in red draws a single polyline with a change in width partway along.

    HTH.
    Attached Images Attached Images

Similar Threads

  1. Get drawing name from VB Script
    By kmelchor in forum VBA/COM Interop
    Replies: 1
    Last Post: 2009-09-17, 06:27 PM
  2. Wildcard for drawing filename in a script
    By dkimbrell in forum AutoCAD Customization
    Replies: 1
    Last Post: 2007-07-11, 05:58 AM
  3. Setting Drawing Standards using a Script?
    By sifuentes in forum AutoCAD Customization
    Replies: 1
    Last Post: 2007-02-21, 08:51 PM
  4. Replies: 4
    Last Post: 2006-02-21, 07:15 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
  •