Can I Do Using Sdk フォローする

0
Avatar
Legacy Poster

Hi,
I want to know whether using C#,
i) At RUN Time, Is it possible to create [b]NEW [/b]btw file
ii) At RUN Time, Is it possible to create [b]NEW [/b]Named SubString ( I know we can modify its value)?
iii) At Run Time, Is it possible to set [b]Named SubString[/b] properties, like Font, x, y coordinates (position in the label) etc... ?

Thanks
Gurpreet

7 コメント

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

For the SDK, I don't think you can do any of those things :(

In ActiveX, however, you can use the DesignObject object to set text properties. Rather than using the name of the sub-string, you would use the name of the entire text object, found on the General tab of the Modify dialog. Here's an example contained in the ActiveX Automation help for setting the X and Y coordinates:

[code]
//Declare a BarTender application variable
BarTender.Application btApp;

//Declare a BarTender format variable \
BarTender.Format btFormat;

//Declare a BarTender design object variable
BarTender.DesignObject btObject;

//Instantiate a BarTender application variable
btApp = new BarTender.ApplicationClass();

//Set the BarTender application visible
btApp.Visible = true;

//Open a BarTender label format
btFormat = btApp.Formats.Open("c:\\Format1.btw", false, "");

//Set the object variable to a text object
btObject = btFormat.Objects.Find("Text 1");

//Set the location of the text object
//1.5 in from the left and 2.5 in from the top
btFormat.MeasurementUnits = BarTender.BtUnits.btUnitsInches;
btObject.X = 1.5;
btObject.Y = 2.5;

//End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
[/code]

Hope this helps.

EDIT: Oops, I should mention that I'm using BarTender 9.4 SR3...earlier versions may not support the above code.
0
Avatar
Shotaro Ito
モデレータ
コメントアクション Permalink

Current BarTender .net SDK and ActiveX don't have such capability to create new label format(btw), new substring or assign New named sub string.

Thanks Jim, yes that's one good alternative - ActiveX object automation (DesignObject) is supported from BarTender 9.3.
You need to have some objects on label formats which you might use.

You have more detail and available properties from
BarTender's Help menu > BarTender Help > Automating BarTender > Automation with ActiveX > Reference > DesignObject object.

Note that to set value of datasource (text or barcode value), you still need to use Named sub string.
[code]
btFormat.SetNamedSubStringValue("SUBSTRING1", "Jane Doe");
[/code]
0
Avatar
Legacy Poster
コメントアクション Permalink

Thanks Jim and Shotaro.. for information ....
Shotaro, is there any scope of having these features in future release?

Thanks
Gurpreet Gill
0
Avatar
Shotaro Ito
モデレータ
コメントアクション Permalink

Hi Gill,
At this moment I cannot tell the future plan of BarTender. However I add your request as a feature request.
0
Avatar
Legacy Poster
コメントアクション Permalink

Hi jim
I want to know whether using C#,
i) how to setup lock epc Not be changed


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

Hi,

Jim, thanks for the information, we are on 10.1 so your idea might do the trick.  Shotaro, I still think that BT should have built in support for this idea in one way or another so please submit this idea to your R&D team.  Right now BT has an option not to print a label that is missing a graphic but will print a label with some of the text in a field cut off without any warning, that doesn't make sense.

 

Regards,

Ed

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

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