getting angle of rotation for rotated dimension

Discussion in 'Forum Feedback / Announcements' started by Aytekin, Oct 20, 2017.

  1. Aytekin

    Aytekin

    Joined:
    Oct 18, 2017
    Messages:
    1
    Likes Received:
    0
    Dear sirs,
    I am creating dimrotated object with given angle successfully. However when i try to get the angle of rotation i am failed. For example `msgbox obje.rotation` gives the message" 0" always even if for vertical or horizontal dimensions..,i get the dimrotated object by selection methods or getentity methods..what i am trying to do is to choose the max vertical and horizontal dimensions in the drawing

    Thanks....
     
    Aytekin, Oct 20, 2017
    #1
  2. Aytekin

    RedSpider Web

    Joined:
    Wednesday
    Messages:
    3
    Likes Received:
    0
    Location:
    United Arab Emirates
    Hi Aytekin,

    It sounds like the obj.rotation property is not returning the expected angle because dimension objects in CAD software often store their rotation differently. Instead of relying on obj.rotation, you might want to check the properties related to the dimension text angle or use GetEntityRotation if available in your CAD API.

    A possible workaround is to extract the endpoints of the dimension line and calculate the angle manually using trigonometric functions like atan2(y2 - y1, x2 - x1). This should give you the actual rotation angle.

    Let me know if you need help with the implementation!
     
    RedSpider Web, Mar 19, 2025 at 7:37 AM
    #2
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.