05-05-2023 09:30 AM
Hello,
When I use the FileDialog in the CpStudio, if the 'VWIterm Directory' can be assigned '\\%DataSetAccessHost%\OpconData$\DataSetManager\TypeData'?(see attachement)
like data set manager, because I need to access the PLC type data files via active mPad, thank you
Solved! Go to Solution.
05-16-2023 09:10 AM
Assigning %DataSetAccessHost% to the string won't work because this variable cannot be resolved at runtime. This has to be done by the CpStudio export. One possibility is to add a string variable to an object definition (e.g. an add-on) and initialize it with the DataSetAccess host in an export template:
@ownerObject.ResolvePathVariables("%DataSetAccessHost%") or a bit simpler in case DataSetAccess runs on the PLC controller: @configurationRoot.PlcHostname
I know there are some project-specific basestation objects doing something like this, but BCI doesn't provide this functionality. So, sometimes it is the easiest way to hard-code the host name.
By the way, in CpStudio 5.8, it will be possible to use such environment variables as initial value of string variables, and they will be resolved automatically when exporting. But currently, this does not work.
05-16-2023 11:25 AM
thank you very much~ ^^