TextObject comments

@dale - yeah, I think maybe 'Last used text" might be enough.

-Pascal

Hi Dan,

For the font I put in some code that would prompt the user, via command line, if they entered a font that couldn’t be found. It would not update the font and revert to the prior entry. It’s a command option that subsequently runs a get string with the checking I mentioned instead of a command option to get the string itself. Maybe that’s what you’re running into trying to script it. I’ll look into hooking up the latter. What, in your opinion, should happen if someone were to type (or use in a script) Uriel when they meant Arial?

Dale’s correct on the RTF. There’s a way to simply get the string from a text entity that’s preserved instead of the RTF. In the dialog version of the command you can do all sorts of formatting. There it makes sense because you see the text formatted, not the raw version. If we just use the string, most formatting you do in the dialog will get lost in the command line version (lots would get lost regardless). Would it be better to have one text entity for the command line and one for the dialog that we didn’t attempt to share between the 2 methods of running the command? Or like Dale mentioned, since it’s scripted maybe it doesn’t make sense to have a default and you’re always required to enter a string.

Tim

I think defaulting to the previously used font makes sense if its typed in wrong. In my case it wasn’t. I checked numerous times. Am I jumping the gun with this script? Sounds like there are some things that need sorting out.

Thanks,

Dan

Hi Dan,

I just talked to Dale and it’s the “=” that I think is screwing you up. This works for me, for instance.

!-textobject font “times new roman”

I don’t really think you’re jumping the gun. Now that the command line code is for the most part done, the option names are unlikely to change. I thought I was going to need to change the font getter and that’s sound like it won’t be necessary. Plus without anyone testing the command line version in the WIP we won’t be able to find and fix things like what you just brought to our attention. What do you think about requiring the user to type in a new string each time the command is run from the command line? Only preserving the formatted text in between runs of the dialog version.

Tim

That could get cumbersome. In my case it’s always the same engraving font, so that’s why I plan to define it every time. It’s hard coded in the script. But I think otherwise, it might be better if the scripted version defaulted to the last used.

Thanks for a the tip about the =. I’ll remove it tomorrow and try again.

Thanks for your help (and Dale’s too)

Dan

Hi Tim,

It’s working well now. Removing the = from the font option solved the issue.

Thanks again,

Dan