Zum Hauptinhalt gehen

Suche

Suche

Setnamedsubstringvalue | Label Data Sources

Kommentare

3 Kommentare

  • Avatar
    Ian Cummings
    Moderator

    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
  • Avatar
    Achecac

    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
  • Avatar
    Ian Cummings
    Moderator

    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.