Jump to content
Developer Wiki and Function Reference Links ×

Editing text in a parametric object


Recommended Posts

Alright.  Thanks to @Pat Stanford for getting me over the hump of converting a script to a parametric object, I'm behaving like a 10 year old with a $20 bill in a candy store.

 

If my object contains text, how can I get the font chooser?  I've discovered a fun infinite loop way of doing it, but force quitting VW every time the object resets isn't optimal.  

Link to comment
  • Vectorworks, Inc Employee

If your object just needs one font you can simply make it a Font Style Enabled object.

This will enable you to use the standard text menu options to set the font attributes with the object selected.

ObjectVariableBoolean(objHand,800,True);

Link to comment

Thanks, Kevin.  I was looking for exactly that.  

 

Then I started wondering how to make the whole text attribute window come up:  FormatTextDialog(font, style, size, spacing, leading, hAlign, vAlign, disable);  

 

I know how to do it in a script.  I just don't know how to trigger it in a parametric object. (with out starting an infinite loop 🙂

Link to comment

If you want to be able to display a dialog from inside a PIO, I think you have to make it Event Enabled (5 times more complicated to script for 10 times more power) and make sure that the dialogs are not in the regeneration loop so they are not triggered on a redraw.

 

I have only done a couple of very simple event enabled scripts. Joshua or others may be better able to help if you actually need that functionality.

Link to comment

Are you looking for more functionality than choosing the dialog from the text menu? Otherwise, you’ll have to do as Pat says, develop an event enabled plug-in, and add a button that raised the dialog. 

 

If you need different parts of the object to have different text settings, assigning text styles by class is an easy option. 

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