几何尺寸与公差论坛

 找回密码
 注册
查看: 1097|回复: 0

【转帖】scale of symbol

[复制链接]
发表于 2009-4-13 14:07:06 | 显示全部楼层 |阅读模式
scale of symbol
hello, i have created and added several custom symbols to my gtol.sym file. now, i need to be able to modify the text height of one of those particular symbols so that the symbol shows up larger than the dimension it is attached to. is it possible to modify the text height by a some scalar number in the code within the gtol.sym file, or must i recreate the text using lines to show the larger representation?
as an example: see attached .pdf; how would one modify the text "a" to be a larger font size, but the triangle stay the same size? in other words, how does one modify the text portion of a symbol without affecting the geometry or line portion of the symbol?
#flagnotes#noper,flag tri-rot a-z
*flag-1,triangle-rotated  a
a,line 2.1,.48,-.03,-.80
a,line -.03,-.80,-.03,1.78
a,line 2.1,.48,-.03,1.78
a,text .72,.50,a
regards,
kline
the letter in the symbol and the symbol itself will be sized according to the font it is being used with. you could create the letter with "geometry" similar to the triangle.

it's going to be a pita any way you try to go about this.  the reason is that if you use a customized symbol from gtol.sym, anyone else who opens up your file in sw won't be able to see that symbol unless they have the same customized symbol in their file.  this (in my opinion) severely limits the benefit of being able to create your own symbols.
that being said, if you want to have a new symbol with the letter larger w.r.t. the triangle, you have a couple of options.
1. as you and cbl said, you can recreate the text with geometry.  if you only want a couple of letters this might not be too bad.  however, if you want the entire alphabet it's going to take you the better part of a day, the letters will still probably look funky, and i don't think there's a way to change the lineweight so that the geometry making up the letters is thicker than the triangle.
2. the other option is to change the size of the triangle around the text in the gtol.sym file, then use some swml (that's solidworks markup language - probably not the right term because it's not really documented) to increase the font size of the portion of the dimension containing the symbol.  this option is much easier on the front end.  because the triangle is the same size for every letter, you only have to figure out the triangle geometry once.  the swml you use to change the font size is <font size=x>, where x is the desired height in mm.  so, for example, when you first create a dimension, the dimension text box contains <dim>.  now let's say you want to add a centerline symbol after the dimension.  you insert the symbol and the text box reads <dim><mod-cl>.  now let's say you wanted the centerline symbol to be 5mm instead of the document default.  you would manually change the text in the box to read <dim><font size=5><mod-cl>.  you can also specify size in points if you prefer.  if you want 12pt font then you would use <font size=12pts>.  note that the "pts" part is case-sensitive.  the "font size" portion is not.
you can also change the font name for any text that you type into the dimension.  for example, if the dimension text box contains
<font name="curlz mt">funnyfont<dim><font size=30pts><mod-cl>
then the dimension will read "funnyfont" in the curlz mt font followed by the dimension value in the dimension's font, then the centerline symbol in 30pt using the dimension's font.  the font name used for the dimension value and any text inside symbols can only be changed by changing the dimension's font.  also, the font size of the dimension value is not affected by the <font size=> tag.  so if you put
<font size=5><dim><mod-cl>
then only the symbol's font size will be changed to 5mm, and the dimension value's font will stay at the dimension's specified size.
ok, i need to stop typing now.   
-handleman, cswp (the new, easy test)
handleman,
that is excellent information and needs to be stored in an faq before it gets lost in the eng-tips ether.
would you create an faq of it, and whatever else can be done with the swml? i will then link it to
i will say that keeping gtol syms within the drawing itself has been proposed to sw corp in the recent
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 04:29 , Processed in 0.036887 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表