Ever wanted to know how to perform a specific operation? Ask the experts.
#62295 by jimgoodman
Thu Nov 07, 2013 5:40 pm
Is there a toolbar code that will load a text style from the Text, Font dialogue box, including all the setting contained in the text style?
#62296 by joshhuggins
Thu Nov 07, 2013 8:08 pm
No direct function code number that I know of, but you can use

^;^S6^F7^nameof.txtstyle$^
#62301 by Roger D
Fri Nov 08, 2013 10:02 am
just tested Josh's code, and it works.
Now if the Save Text Style would include the Font name, it would be great.
#62302 by wwwylie
Fri Nov 08, 2013 10:55 am
The only problem with Text Styles is that they don't set the Line Factor for PText & MText. Below is the code I have for my Text Context Menu, which sets the factor properly too. I use the first part - Text Styles Dropdown - in another toolbar for quick access to the text style I want from anywhere in DataCAD. Big thanks to Josh Huggins - I programmed this toolbar long ago based on his site (I think some of the toolbar buttons are still the ones I got from him). Additional buttons are PText, PText Resize, Alignments.
Code: Select all[Text Styles]
DropDownCount=6
Hint=Text Styles
Icon=_WAW - Fonts

Hint00=Text Styles
Icon00=_WAW - Fonts
A00=^S6^F7^

Hint01=Mr.Hand 4" - Standard Text
Icon01=_WAW - Fonts-Mr_Hand
A01=^;^S6^F7^Mr_Hand - 4in.txtstyle$^S7^F7^0.8088235$^S0^

Hint02=Copperplate 8" - Room Names
Icon02=_WAW - Fonts-Copperplate
A02=^;^S6^F7^Copperplate - 8in.txtstyle$^S7^F7^0.772$^S0^

Hint03=Graphite Lite 12" - Elevations
Icon03=_WAW - Fonts-Graphite_Lite
A03=^;^S6^F7^Graphite Lite - 12in.txtstyle$^S7^F7^0.772$^S0^

Hint04=DataCAD 8" - Room Names
Icon04=_WAW - Fonts-DataCAD
A04=^;^S6^F7^DataCAD - 8in.txtstyle$^S7^F7^0.7432432$^S0^

Hint05=Century Gothic 4"
Icon05=_WAW - Fonts-Century Gothic
A05=^;^S6^F7^Century Gothic - 4in.txtstyle$^S7^F7^0.8283133$^S0^

[separator]

[ParaText]
Hint=ParaText
Icon=_WAW - Fonts-Paragraph
A=^;^S6^S7^

[Resize ParaText]
Hint=Resize ParaText
Icon=_WAW - Fonts-Paragraph_Resize
A=^;^S6^S7^S5^

[separator]

[BottomLeft]
Hint=Align Bottom Left
Icon=_WAW Text Align - BL
A=^;^S6^S5^F1^F7^S0^S7^F8^F1^F7^S0^S0^

[BottomCenter]
Hint=Align Bottom Center
Icon=_WAW Text Align - BC
A=^;^S6^S5^F2^F7^S0^S7^F8^F2^F7^S0^S0^

[BottomRight]
Hint=Align Bottom Right
Icon=_WAW Text Align - BR
A=^;^S6^S5^F3^F7^S0^S7^F8^F3^F7^S0^S0^

[separator]

[MiddleLeft]
Hint=Align Middle Left
Icon=_WAW Text Align - ML
A=^;^S6^S5^F1^F6^S0^S7^F8^F1^F6^S0^S0^

[MiddleCenter]
Hint=Align Middle Center
Icon=_WAW Text Align - MC
A=^;^S6^S5^F2^F6^S0^S7^F8^F2^F6^S0^S0^

[MiddleRight]
Hint=Align Middle Right
Icon=_WAW Text Align - MR
A=^;^S6^S5^F3^F6^S0^S7^F8^F3^F6^S0^S0^

[separator]

[TopLeft]
Hint=Align Top Left
Icon=_WAW Text Align - TL
A=^;^S6^S5^F1^F5^S0^S7^F8^F1^F5^S0^S0^

[TopCenter]
Hint=Align Top Center
Icon=_WAW Text Align - TC
A=^;^S6^S5^F2^F5^S0^S7^F8^F2^F5^S0^S0^

[TopRight]
Hint=Align Top Right
Icon=_WAW Text Align - TR
A=^;^S6^S5^F3^F5^S0^S7^F8^F3^F5^S0^S0^

Image
#62305 by jimgoodman
Fri Nov 08, 2013 11:39 am
Roger D wrote:just tested Josh's code, and it works.
Now if the Save Text Style would include the Font name, it would be great.


Thanks to everyone - I have them working now thanks to everyone.

The font name not being saved in the text style is a bug that has been reported and I have it on good authority that it will be fixed for the next update.

Another good reason to have a the current subscription edition 8)
#62306 by David A. Giesselman
Fri Nov 08, 2013 11:45 am
wwwylie wrote:The only problem with Text Styles is that they don't set the Line Factor for PText & MText.

Hmm, it works for me.

Dave
#62307 by jimgoodman
Fri Nov 08, 2013 11:53 am
wwwylie wrote:Big thanks to Josh Huggins - I programmed this toolbar long ago based on his site (I think some of the toolbar buttons are still the ones I got from him).


I too would not be customizing toolbars without Mr. Huggins assistance.

As I mentioned, I have the toolbars working well.

Is there a direct code to turn text boundaries on and off in PText?
#62309 by David A. Giesselman
Fri Nov 08, 2013 12:08 pm
jimgoodman wrote:... Is there a direct code to turn text boundaries on and off in PText?

Not yet. ;)

Dave
#62310 by wwwylie
Fri Nov 08, 2013 12:09 pm
David A. Giesselman wrote:
wwwylie wrote:The only problem with Text Styles is that they don't set the Line Factor for PText & MText.

Hmm, it works for me.

Dave


If I load a Text Style from the Font (F7) option in the Text menu, it sets the factor there, but not in PText & MText. If I load a Text Style from the Font (F1) option in either the ParaText or MText menu, it sets the factor fot ParaText & MText, but not for regular text.
#62312 by David A. Giesselman
Fri Nov 08, 2013 12:16 pm
Yep, they are 2 separate variables. Are you wanting it to set the Factor for all types of text no matter where the dialog is invoked from?

Dave
#62313 by wwwylie
Fri Nov 08, 2013 12:24 pm
David A. Giesselman wrote:Yep, they are 2 separate variables. Are you wanting it to set the Factor for all types of text no matter where the dialog is invoked from?
Since it sets the font for both, I thought it should set the factor for both as well. I'm ok with leaving it how it is because I have my toolbar set to fix it for me when I change my Text Styles.
#62317 by joshhuggins
Fri Nov 08, 2013 1:14 pm
wwwylie wrote:I think some of the toolbar buttons are still the ones I got from him
I thought those buttons looked rather sexy :lol:

Who is online

Users browsing this forum: No registered users and 20 guests

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.

DataCAD

Software for Architects Since 1984