几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-04-13, 02:07 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】scale of symbol

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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to size the welding symbol yang686526 SolidWorks二次开发 0 2009-04-13 12:02 PM
【转帖】can you build a weld symbol with code yang686526 SolidWorks二次开发 0 2009-04-13 09:31 AM
quindos 6 - +/- symbol and degree symbol huangyhg PC-DMIS 0 2009-04-06 10:29 PM


所有的时间均为北京时间。 现在的时间是 10:27 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多