Seagull.bartender.print.labelformatthumbnail.create() Error With Bartender 10.0 Only フォローする

0
Avatar
Legacy Poster

I used Bartender Automation 9.3 SR1
Build 2715 SDK for development of an application in VB.net Visual Studio 2010. The
app shows thumbnails of labels (using
Seagull.BarTender.Print.LabelFormatThumbnail.Create()). As long as the
vb app is installed in users' PCs with Windows 7 (32 or 64-Bit) with
Bartender 9.3 or 9.4 Automation version installed (the 2 versions we
mainly use) it is able to show the thumbnails Ok. If I install the same
applicatoin (compiled with the 9.3 SDK) in any PC with Windows 7 (32 or
64-Bit) that has Bartender Automation 10.0 SR4 Build 2868 (the new version we are testing) the thumbnails do not work, instead I get the
following exception:


 

Seagull.BarTender.Print.LabelFormatThumbnailException:

Seagull.BarTender.Print.LabelFormatThumbnailException: Unable to export label

format thumbnail image. BarTender may need to be reinstalled. --->

System.Runtime.InteropServices.COMException: Retrieving the COM class factory

for component with CLSID {D644CE25-129C-4FD0-BE79-2A0E0C91B8C5} failed due to

the following error: 80040154 Class not registered (Exception from HRESULT:

0x80040154 (REGDB_E_CLASSNOTREG)).

   at

Seagull.BarTender.Print.LabelFormatThumbnail.Create(String formatFileName,

Color backgroundColor, Int32 width, Int32 height)

 


1- Any ideas of what to do to correct this problem?


2- Can you please write the definate/clear steps ofr adding the SDK
references & DLLs to a Visual Studio solution if using Bartender 9.3
SR1 Build 2715? Please include details of what DLLs one has to add to
the project references with applicable settings details (Copy Local,
Embed Interop Types, etc) and to the Project itself with applicable
settings details (Build Action, Copy to Output Directory, etc).


 

Thank you

9 コメント

0
Avatar
Domingo Rodriguez
モデレータ
コメントアクション Permalink

1. The Create() method of the "LabelFormatThumbnail" class needs 4 parameters:

 

FormatFileName : The file name of the LabelFormatDocument to export the thumbnail of.

BackgroundColor : The background color of the thumbnail image. This parameter does not take into account the alpha channel of a Color.

 

Width : Defines the width of the exported thumbnail in pixels.

 

Height : Defines the height of the exported thumbnail in pixels.

 

As an example:

 

Public Sub Demo()
   ' Create an image of the format. Dim image As Image = LabelFormatThumbnail.Create("C:\Format1.btw", Color.White, 400, 400)

   ' Save that image to file
   image.Save("C:\ImageThumbnail.bmp")
End Sub

 

 

BTW, if you're wanting to test the latest version of BarTender (the one we currently sell), please download and test BT v10.1

0
Avatar
Legacy Poster
コメントアクション Permalink

Well, I am passing the parameters you mentioned. This is my call:

 

Dim thumbnail As Image = Seagull.BarTender.Print.LabelFormatThumbnail.Create(file.FullName, System.Drawing.Color.Gray, width, height)

 

Where file.fullname is the full path for a System.IO.fileinfo variable that targets a bartender .btw file, width & height are integer variables set for 120.

 

As I explained above this works just fine as long as the application is run in a PC with Bartender 9.3 or 9.4. About Bartender 10.0, we are testing what we already bought, in other words we had already paid for 10.0 so is not that we are "testing a trial version".

 

Any ideas then about the Thumbnails problem?

Could you try to recreate the problem yourself?

How about my other question above on the detailed steps of how to reference the SDK DLLs with 9.3?

 

Thank you again,

0
Avatar
Domingo Rodriguez
モデレータ
コメントアクション Permalink

Let me know if you've the same problem when testing BT v10.1. If yes, please contact our support team by email / telephone and report the issue to us:

http://www.bartenderbarcodesoftware.com/label-software/technical-support.aspx#contact

 

With regards to 2. I prefer someone else to reply to this, as I don't have the whole details.

0
Avatar
Legacy Poster
コメントアクション Permalink

Our interest as developers is to make it work in what we already have licensed which is 10.0, since this is not normal behavior.

Is this something you can help me escalate to your developers? I would appreciate any help to solve it.

0
Avatar
Domingo Rodriguez
モデレータ
コメントアクション Permalink

Comment from our developers:

 

"Between those versions we changed how the thumbnail is generated. To generate the thumbnail the older versions used a Windows shell extension where the newer versions create the thumbnail directly by reading the BTW document file. The newer versions no longer installs the thumbnail shell extension. The user gets an exception because he is using (distributing) the older Seagull.BarTender.Print assembly DLL with his application, because the assembly is looking for the thumbnail shell extension which does not exist for 10.x installs.
I would suggest as a possible workaround to use the Seagull.BarTender.Print.dll installed in the GAC. In this way they will get the correct Seagull.BarTender.Print assembly for the correct version of BarTender. Note: We started installing to the GAC (global assembly cache) with version 9.4."
 
As we started installing the assemblies to the GAC in BT v9.4, you will still need to distribute the 9.3 DLL if BT v9.3 is in use. So basically, in my point of view, you will need to compile two versions for your application, one to be compiled with v9.3 for BT v9.3, one with 10.0 to be used with v10.0.
0
Avatar
Legacy Poster
コメントアクション Permalink

How to pass parameters via registry vb.net.

0
Avatar
Domingo Rodriguez
モデレータ
コメントアクション Permalink

Mauro,

 

I'm not sure I get your question... Could you please clarify and also let us know if it's related to this topic?

0
Avatar
Legacy Poster
コメントアクション Permalink

Hi there , we have BT9.4 and i'm trying to get an Access DB to display a thumbnail.

 

I'm not a programmer but due to circustances I need to get this done before the end of hte month.

 

Can anyone help me please. Mod please move to another topic if you feel that it should be.

 

Here is my code, failing on this line "Temp_Image_Lab = LabelFormatThumbnail.Create(File_Path_and_Name, Colour.White, 400, 400)

The error= "Object required"

I do note that the Dim....image doesn't show up in coloured text like String does, is Image not a correct term in VBA? :

 

Private Sub List_Labels_AfterUpdate()
    ' Create an image of the format.'
    Dim Temp_Image_Lab As image
    Dim File_Path As String
    Dim LabelFilename As String
      
    Dim btApp As BarTender.Application
    Set btApp = CreateObject("BarTender.Application")
   
    File_Path = "G\Company\Vector\Bartender\BartenderLabels\LABELS\"
 
   LabelFilename = Chr(34) & Me.[List_Labels].[Column](2) & Chr(34)
    File_Path_and_Name = File_Path & LabelFilename
   
    Temp_Image_Lab = LabelFormatThumbnail.Create(File_Path_and_Name, Colour.White, 400, 400)
   
    'Do something with the above to show on screen (e.g. save to a temporary location / have an image box displaying the file at that location'

    btApp.Quit

End Sub
 

 

Thanks.

0
Avatar
Domingo Rodriguez
モデレータ
コメントアクション Permalink

The method you're trying to use is from our .NET SDKs, and therefore cannot be used with VBA.

 

Please open BarTender's Help (F1 key) and look into Automating BarTender using ActiveX Automation. Do the methods available in the "Format" object give you what you need, such as "ExportToFile()" or "ExportToClipboard()"?

ログインしてコメントを残してください。