Custom Background Color Follow
Using BarTender 2016 EA.
The company wants to print color bars on the labels, with the colors read from the database.
Working in the OnSerialize event,
myR=42 myG=38 myB=49 Format.Objects("boxLabelColor").FillColor = BtColor.FromRgb(myR,myG,myB)
This does not work:
myR=Format.NamedSubStrings("ds_R").Value myG=Format.NamedSubStrings("ds_G").Value myB=Format.NamedSubStrings("ds_B").Value Format.Objects("boxLabelColor").FillColor = BtColor.FromRgb(myR,myG,myB)
The indicated error is "Type Mismatch: 'BtColor.FromRgb'
How do I get data-driven color bars?
Much appreciation in advance.
Okay, more info after taking the night to clear my head.
At least in the Print Preview. (It's Sunday morning, and I'm 30 miles away from the printer, so can't test that.)
In the Script Editor window, the Named Data Sources were returning null values, which causes the error WHILE EDITING.
Once actually printing, it works correctly.
Changing the script for the Named Data Sources to return a non-null/empty value if no data is found (i.e. while editing) cleared up the Type Mismatch error while editing, too.
Adam Flores Sr
Please sign in to leave a comment.