几何尺寸与公差论坛

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

【转帖】how to escape special chars

[复制链接]
发表于 2009-4-12 21:15:40 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 09:00 , Processed in 0.036187 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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