|
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 |
|