Jump to content

Angle of an image


Recommended Posts

Hello all,

is there a way to get the rotation angle of an image (bitmap) inserted in Vectorworks?

The angle is clearly shown in the OIP but it seems to be unreachable by code 🤔 

 

Here's what I tried:

vs.HAngle(h)

This returns always 0.

 

I also searched in the appendix for some documented index to get the angle, but found nothing…

vs.GetObjectVariableReal(h, index)

 

Also tried to get it from record fields…

vs.GetParametricRecord(h)

but Bitmaps are a native type and not plugin objects, so neither this worked…

 

Other ideas / suggestions?

Link to comment

Thank you JBenghiat, just tested and it works!

 

r, offset, rotationXAngle, rotationYAngle, rotationZAngle = vs.GetEntityMatrix(imageHandle)

rotationZAngle is the image (imageHandle) rotation value (the same showed in the OIP)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...