Adjust Insert point for mirrored blocks

Discussion in 'AutoCAD' started by Craig, Nov 6, 2004.

  1. Craig

    Craig Guest

    I've written a script that reads my drawing's blocks, using their insertion
    points to arrange them contiguous runs. It then prints the info out to a
    text file.

    Unfortunately, our block library is inconsistent in terms of the blocks'
    insertion point and initial rotation. I've adjusted for this with simple
    trig functions, but I'm not sure how to account for a block that has been
    mirrored. If it is mirrored in either X or Y, my adjustment function
    obviously needs to do something different than it does to handle rotation.

    It appears that the block's Xscale becomes -1 when the its mirrored in
    either the X or Y plane (not both), but I don't see a way of determining
    whether it was mirrored about X or Y, so I don't know which adjustment I
    need to make. Is there another way I can account for this?

    In case more detail is needed, what I've done so far is create a text file
    with each block name, its init rotation relative to what I define as 0, and
    the length and angle of a line between the blocks ins point and the ins
    point I want to use for the comparison. In my script I use that info to
    adjust the Y point using sine and the X point using cosine. It looks like I
    need to adjust one or the other when I have a mirrored block, I just can't
    see how to tell which one. Any ideas?

    Thanks much,
    Craig
     
    Craig, Nov 6, 2004
    #1
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.