michaelk Posted June 4, 2019 Share Posted June 4, 2019 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. Quote Link to comment
Vectorworks, Inc Employee klinzey Posted June 4, 2019 Vectorworks, Inc Employee Share Posted June 4, 2019 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); Quote Link to comment
michaelk Posted June 4, 2019 Author Share Posted June 4, 2019 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 🙂 Quote Link to comment
Pat Stanford Posted June 4, 2019 Share Posted June 4, 2019 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. Quote Link to comment
JBenghiat Posted June 4, 2019 Share Posted June 4, 2019 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. Quote Link to comment
Recommended Posts
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.