几何尺寸与公差论坛

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

【转帖】bom swbomtable.setcolumncustomproperty problem

[复制链接]
发表于 2009-4-13 09:19:53 | 显示全部楼层 |阅读模式
bom swbomtable.setcolumncustomproperty problem
hello
i want that one of my column bom points on a concatenation of 2 custom properties
to do so manually
i select the column, the i click on equation, i write
`custoprop1`" "`custoprop2`
but i can t do that by using api
here is my fucntion
sub chancustompropertybom(swtable as tableannotation, descriptionname as string, bomcolumnid as integer)
dim swselmgr as sldworks.selectionmgr
dim swbomtable as sldworks.bomtableannotation
dim i as long
dim test as string
set swbomtable = swtable
dim toto as string
toto = "`description debit fr`" + """ """ + "`description debit 2`"
swbomtable.setcolumncustomproperty bomcolumnid, toto
end sub
the column is updated
but "`custoprop1`" "`custoprop2`" is written instead of
`custoprop1`" "`custoprop2`
any idea
joseph, try this:
toto = "`description debit fr`" + chr(34) + " " + chr(34) + "`description debit 2`"
the chr(34) is vba's way of inserting a quote into a string. i added a space in between as it looks like that is what you have. if you don't, then do this:
toto = "`description debit fr`" + chr(34) + chr(34) + "`description debit 2`"
good skill! (i don't believe in luck.)
to defeat the wheat, go against the grain.
tom, your suggestion was pertinent but it doesn't work too.
in fact, when we define the column, we don't use the "custom property" button but the "equation" button.
really, we define an equation which is an concatenation of two custom properties.
i've searched on the api help, but the string "equation" never appears near "tableannotation".
maybe another suggestion ?
edited: 10/22/2008 at 12:41 pm by florent roussel
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-24 03:01 , Processed in 0.035146 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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