Zum Hauptinhalt gehen

Suche

Suche

Change Fontsize Programitically

Kommentare

1 Kommentar

  • Avatar
    Ian Cummings
    Moderator

    You need to make use of the DesignObject() that became available in v9.3 onwards:

     

    // Declare a BarTender application variable 
    BarTender.Application btApp;
    
    // Declare a BarTender document variable 
    BarTender.Format btFormat; 
    
    // Declare a BarTender design object variable 
    BarTender.DesignObject btObject; 
    
    // 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, "");
    
    // Set the object variable 
    btObject = btFormat.Objects.Find("Text 1");
    
    // Set the text size to 14pt 
    btObject.FontSize = 14;
    
    // End the BarTender process 
    btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges); 
    
    
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.