Writing to a Global Data Field in VB Script S’abonner

0
Avatar
George Holcombe

Good Afternoon Everyone,

I have a Named Data Source called "ProductNumber", and I have linked it to a Global Data Field. I understand that I can read from it, but when I attempt to write to it in VB Script the script environment flags:

"OnOpen (Line 1):  Unable to write read-only property."

This is the line I've been using:

Format.NamedSubStrings("ProductNumber").Value = 123456789

I'm hoping there is a setting somewhere which would allow me to write to it. On the other hand, this could be an intended restriction in BarTender. I'm using the Automation Enterprise Edition, so I should have all the needed features. 

Thanks!

George Holcombe

 

 

2 commentaires

0
Avatar
Shotaro Ito
Modérateur
Actions pour les commentaires Permalien

As of BarTender 2016R3, Global Data Field is read only property and that's by design.
There's numerous request from BarTender users to enable modify value of Global Data Field by VB Script,
so I'm adding you to the wish list - hopefully we have enough request to realize the feature.

0
Avatar
George Holcombe
Actions pour les commentaires Permalien

Just as a follow up for anybody looking for a work-around:

I was able to successfully pass values/information to other BarTender documents through the use of the FileSystemObject scripts. The BarTender's VBScript Language Reference help file does provide enough information to implement it.

My strategy was:

- Write script in the "transmitting" document that will create and write values/information to a txt file.

- Write script in the "receiving" document that will open and read values/information from the same txt file.

I hope this helps!

George Holcombe

Vous devez vous connecter pour laisser un commentaire.