Assigning Embedded Image To A Picture Object Follow

0
Avatar
Legacy Poster

Hi, I am newbie, first time using Seagull Bartender software. I need some confirmation on using VB Scripting. I am trying to directly assign a embedded image of a picture_object_1 on a label, with a embedded image from another picture_object_2 (set as non-printable), based on 'Country' database field.

Eg. placing a VB Script code in the Country database field; to check value of Country database field, and dynamically asssign a embedded picture of a eg Post-Paid label for the respective country.

If Format.NamedSubStrings("ref_country").Value = "AUSTRALIA" Then
Format.Objects(pp_1).Value = Format.Objects(pp_2).Value
End If

Is it possible to do that in Bartender ? Or do I always have to specify the picture object Datasource & specify the file Path inside the picture object?

Thank you.

1 comments

0
Avatar
Shotaro Ito
Moderator
Comment actions Permalink

Hi Kiat,

From BarTender 9.3 or later, on Automation Edition or above,
From File > Label Format Option's VB Script,
You can set and get picture's source image by
[code]Format.Objects("PictureObjectName").PicturePath [/code]
Property.
However for embedded picture, it only returns original path of source picture in design time.
So you still need to keep the image file in original path - not really embedded.

About Modify object from VBScript, please read:[url="http://s3.amazonaws.com/SeagullBarTender/ftp/WhitePapers/WhitePaper_DynamicallyChangingObjectsAtPrint-TimeUsingVBScript.pdf"]White paper: Dynamically Changing Objects at Print Time using VBScript[/url]

I'd say your current method - specify datasource picture's path is far simple and better.
Also you can use relative path from format's saved location (".\pic1.png" or "\images\pic1.png"), instead of full path("D:\images\pic1.png"), to achieve more portability.

Hope that helps!

Please sign in to leave a comment.