几何尺寸与公差论坛------致力于产品几何量公差标准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-12, 09:15 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】how to escape special chars

how to escape special chars
i am trying to add a custom property which needs quote marks embedded in it thusly...
prop = drawingdoc.addcustominfo3("", propname(11), swcustominfotext, "$prp:\" sw-current sheet\" ")
however, the method i've used in so many other (non sw) places does not work, namely preceding the character with a backslash.
how do i do this in an sw macro?
thanks
never mind, figured it out.
don't escape, replace... chr(34)
perry,
use the chr command:
prop = drawingdoc.addcustominfo3("", propname(11), swcustominfotext, "$prp:" & chr(34) & "sw-current sheet" & chr(34))
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
damn, not fast enough
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
if this is vba, two quotes in a row that are inside quotes makes a single quote. for example, assume svar is a string variable
svar = """my string in quotes"""
will put the value
"my string in quotes"
into svar. to take it further:
svar = """""" ' (there's six quote marks in a row) will yield:
""
i'll get you eh steve, if it's the last thing i dooooo!
welcome back jorn. it seems like you haven't had much to say for a while. and where is solidair?
dan miel
originally posted by: dan miel
welcome back jorn. it seems like you haven't had much to say for a while. and where is solidair?
dan miel
thank you dan! yeah, i have been busy lately however i am watching the threads to see if anything intersting pops up.
solidair? i am also wondering where he went. i hope he is fine somewhere.
have a great day!
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
thanks all !
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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



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


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