Jump to content
Sign in to follow this  
tom kyler_dup1

Reading the active font

Recommended Posts

I have a linear plug-in object that draws an object with some text near it. When I select this object and change the font from the main menu, the font doesn't update in real time. I have to deselect the item, change the font, reselect the item and then resize it to get the script to recalculate with the new font.

The function I'm unable to find in the reference is one that reads the current active font and allows me to apply it to the selected object...or at least I could use an understanding of what happens to a selected object when the font menu is changed from one font to another. Basically, I want to select my linear plug-in object, go to the font menu, change the font, and have my item updated at that time. Anybody know which function I'm missing?

[ 10-08-2004, 04:50 PM: Message edited by: tom kyler ]

Share this post

Link to post


Do you set the font face from within your script? I have seen PIO's accept color, font face and size changes by selecting the PIO and using menu options to apply them, but you may have a problem if your script sets them explicitly.

Also, what properties are set for the PIO? The one I examined had the RESET button highlighted with no checkboxes selected.


Share this post

Link to post


I do not explicitly set the font. I do set the alignment, and use a pull-down menu in the OIP to set the size, so I do set some text properties explicitly, but not the font. If I were to change the font on the pull-down menu

Share this post

Link to post

Include this line of code in your script and it

will enable the font menu.

SetObjectVariableBoolean(gObjHd, 800, TRUE);

where gObjHd is the handle to the PIO.


Share this post

Link to post

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.

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.

Sign in to follow this  


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...