Jump to content

Change symbol orientation programmatically.


Recommended Posts

I'd like to give users the option to rotate a wall box symbol so that we maintain control over how the device IDs are displayed (see attached image). I've tried using auto rotate for the text, but it changes the location of text fields.

 

Ideally, it would be nice to change the visibility or orientation of components in the symbol based upon a drop down menu in the OID panel for the symbol, but I'm not sure how to approach that.

 

What is the best way to handle this? Right now I have four different symbols based upon the desired orientation. It would be nice to have one symbol with four orientation options.

Screenshot 2024-11-08 123741.png

Link to comment

If you already can program, the biggest learning hurdles are the idea of "Handles" to identify objects and "container objects" that have a handle but also contain other objects and how to move between the different levels.

 

This thread has a pretty good (no modesty here) tutorial on creating a point type PIO and another on adding that to a workspace.

 

 

You will need to enhance the CreateText portion of the script to draw your wall box symbols and probably to rotate the parts according to the PIO rotation.

 

Inside the PIO all locations are offset from a local 0,0 point at the insertion point of the PIO.

 

Ask as you need more help.

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...