Add Data Source To Objects Follow

0
Avatar
Legacy Poster

Hi all,

 

I have around 500 labels each with several text objects.  I need to identify the text objects (done, using DesignObjects.Objects to identfy the Name field as containing "Text") and then add a data source with the same data as the text object value.  Manually this is simple through the Properties box on each text field.  However as I said I have several text fields on over 500 labels which all need to have data sources added.

 

Is there any way of doing this programmatically?  I have looked through the forums for .NET, ActiveX or BTXML solutions and have so far found no way of automating this procedure.

 

Someone else created the labels originally without the data sources and I have been tasked with resolving the issue.

 

Any help would be greatly appreciated.

 

Many thanks,

 

Daryl

4 comments

0
Avatar
Shotaro Ito
Comment actions Permalink

Hi, unfortunately there's no way to assign name to unnamed data source from SDK etc.

I'm sorry to tell that you need to name those from BarTender GUI.

Note that BarTender is label design software with automated print aid - not intended for automated layout generation.

 

You could export and import named data sources from BarTender UI and drag'n drop to controls, and [F12] to view names on templates, if that helps a bit.

0
Avatar
Legacy Poster
Comment actions Permalink

Thanks for the reply.  I thought that may the case.

 

What I am trying at the moment is to set up a dummy label with a number of text fields with attached data sources.  I then open each of the 500 labels in turn and loop through the text fields and apply the x and y values to the dummy text fields and the value to the data source.  This seems to be working well however I would also like to change the Field Name and Name of the data source.  I'm pretty certain I cannot alter the Name, but what about the Field Name? Is it possible to modify that programmatically?

 

Once again, many thanks for your quick reponse.

0
Avatar
Shotaro Ito
Comment actions Permalink

Thanks for the update - that's interesting approach.

Unfortunately, no. there's no way to assign field name. You could pre-define some text object with named data source and field names, if that's help any.

0
Avatar
Legacy Poster
Comment actions Permalink

Once again, thanks for the quick response.

 

My method is actually working okay at the moment, I have a list of dummy text fields with data sources as well as a load of lines and boxes to populate the label.  The only issue I have now is some of the formatting with respect to things like paragraph width in text fields or Object Reference Point with boxes.  The Object Reference Point value changes the location of the box with respect to the given X and Y values.

 

Is there any way to get/set the absolute X, Y, Width and Height or alternatively find the Object Reference Point value from a Design Object?

 

EDIT: I've just seen the exact same question in a thread on the ActiveX page.  Apologies for reposting.

http://forums.seagullscientific.com/index.php?/topic/3119-how-to-determine-object-reference-point-programmatically/

Please sign in to leave a comment.