Ver 10 Multiple Templates In Document 追蹤

0
Avatar
Legacy Poster

In Version 10 you can have multiple templates in a document. Is there a way to get the names of those templates through VB?

5 意見

0
Avatar
Shotaro Ito
評論操作 永久連結

Hi gck,
You can list name of templates in a document, by Format.UsedNames() command via ActiveX, when you control BarTender from VB.net.

[code]
'Declare a BarTender application variable'

Dim btApp As BarTender.Application

'Declare a BarTender document variable

Dim btFormat As New BarTender.Format

'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, "")

'Show a list of template names on the template(s)'

MessageBox.Show(btFormat.UsedNames(BarTender.BtNameType.btUsedTemplateFields), ":")

'End the BarTender process '

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)

[/code]

Or do you mean, VB Script in BarTender document?
0
Avatar
Legacy Poster
評論操作 永久連結

Controlling Bartender through Print SDK and VB.Net
0
Avatar
Shotaro Ito
評論操作 永久連結

Ok, hope the above helps. unfortunately I couldn't find how to specify / enable template from ActiveX, you need to use Template Selector or Enable when True condition, of BarTender's page setup > Template.
0
Avatar
Legacy Poster
評論操作 永久連結

I am trying just to get the label template names from the document since that is a field in my database. I am using .NET Print SDK to open the documents. It looks like the SDK doesn't have properties to get to template names. By the above code will I have to use ActiveX to get to the label template property?
0
Avatar
Shotaro Ito
評論操作 永久連結

You right, Template names are not aviailable from .net SDK at the moment.

登入寫評論。