Setnamedsubstringvalue | Label Data Sources
Hi,
Is it possible to get the names of the data sources on a label? I have around 50 named data sources and currently 20 label formats but a label will not contain all of them. If i get get the data sources then i can use SetNamedSubStringValue more effectively.
Thanks
Richard
-
You need to work with the NamedSubStrings collection. The GetAll() method returns a string that contains the name and value of all data sources on the
template(s) separated by a delimiter.
// Declare a BarTender application variable BarTender.Application btApp; // Declare a BarTender document variable BarTender.Format btFormat; // Create a new instance of BarTender btApp = new BarTender.Application(); // Set the BarTender application visible btApp.Visible = true; // Open a BarTender document btFormat = btApp.Formats.Open("c:\\Format1.btw", false, ""); // Display all of the named data source values MessageBox.Show(btFormat.NamedSubStrings.GetAll(",", ":")); // End the BarTender process btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);0 -
I need to have my label not to remember the embebed data of the previously saved label.
I pass to the label many named datasources with method SetNamedSubstringValue and some times I need not to pass it any value, but I dont want the label to "remember" last value set in that datasource and just leave it blank.
Is there a command i cound send or some kind of property like "forget last embebed data" in the named datasource I could use?
0 -
Achecac: The problem is that the document would likely be cached in the BarTender process with the named data source already changed from the previous print job. Either send it a reset value for the named data source that you don't wish to change, else specify the document to be closed (without saving changes) on a per print job basis. Obviously the latter approach will affect performance.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare