Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Can I define the filename in my script and NOT get the 'Save As' message box?
(This message box interrupts my automatic build. And human intervention is needed, which is not desired.)
Can I define the filename in my script and NOT get the 'Save As' message box?
(This message box interrupts my automatic build. And human intervention is needed, which is not desired.)
I'm afraid, currently this is not possible. The current code in the online manager directly opens a file dialog, it is not possible to catch it using prompt_answers. Currently, there is no easy workaround except external tools like AutoIt.
I did create CDS-30520 for this issue. You may ask your support contact to add your company or OEM as an interested customer to this issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you Markus.
As a work-around, I split my build process:
First create all 'project'-files (without any user intervention) (considerable amount of time).
Next create all 'boot application'-files (with user intervention) (several minutes).Regards,
Edwin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see that CDS-30520 has been marked a duplicated of CDS-22407, which is now released under 3.5 SP2.
It is now possible to use the IScriptApplication.create_boot_applicaton(String filename) method instead of using the onlineapp object.
This is great, except that the visu files containing the images, text lists and webvisu files are not generated.
The compilation context is also not saved
Is there a simlar way to get those by specifying the path?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2014-03-13
Originally created by: M.Schaber
Hi, Francois,
francois hat geschrieben:
I see that CDS-30520 has been marked a duplicated of CDS-22407, which is now released under 3.5 SP2.
It is now possible to use the IScriptApplication.create_boot_applicaton(String filename) method instead of using the onlineapp object.
This is great, except that the visu files containing the images, text lists and webvisu files are not generated.
The compilation context is also not saved
Is there a simlar way to get those by specifying the path?
If the project was changed since the last download or online change to a PLC, and you create a boot application with update_compile_info set to True, this will overwrite the current compiler reference context with the one matching the boot project (which no longer matches the one on the PLC). Thus, a direct conline change to the PLC will no longer work. On the other hand, the reference context now matches the created boot application, so you can login to any PLC on which you deploy the generated boot application. This updated compile context is also the one to be included into a project archive.
As a temporary workaround, you could also login to the PLC before creating the boot application, this should also write out the files.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to reproduce the same behaviour with the Automation Platform.
So far, everything is compiled and generated, except for the visu files.
Is there anyone that know how to export the visu files using the automation platform?
What I have done so far:
foreach(IApplicationObject5appinapplications){Â Â lmm.Compile(app.ApplicationGuid);Â Â IDownloadInfobootProjectInfo=lmm.GetOfflineBootProjectInfo(app.ApplicationGuid);Â Â IOnlineApplication17onlineApplication=onlineManager.GetApplication(app.ApplicationGuid)asIOnlineApplication17;Â Â using(BinaryWriterwriter=newBinaryWriter(File.Open(SAVE_PATH+app.ApplicationName+".app",FileMode.Create)))Â Â Â Â onlineApplication.StreamDownloadCommand(writer);Â Â Â Â lmm.UpdateDownloadContext(app.ApplicationGuid);}
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use GenerateCode(appGuid, false, false) instead of Compile(...).
Get the Visual Manager object below the application and, if the object supports the interface IVisualManagerObject4, use CreateVisualizationFiles(stPath, true).
BR
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When creating a boot application (offline), a 'Save As' message-box pops up. And a filename is requested.
Can I define the filename in my script and NOT get the 'Save As' message box?
(This message box interrupts my automatic build. And human intervention is needed, which is not desired.)
I found:
But I do not know if those will do the job.
Did anyone use create_boot_application() and found a work-around for the message box?
Regards,
Edwin.
Originally created by: M.Schaber
Hi, Edwin,
Can I define the filename in my script and NOT get the 'Save As' message box?
(This message box interrupts my automatic build. And human intervention is needed, which is not desired.)
I'm afraid, currently this is not possible. The current code in the online manager directly opens a file dialog, it is not possible to catch it using prompt_answers. Currently, there is no easy workaround except external tools like AutoIt.
I did create CDS-30520 for this issue. You may ask your support contact to add your company or OEM as an interested customer to this issue.
I have been asking myself the same question. Would definitely speed up the build automation process!
Thank you Markus.
As a work-around, I split my build process:
First create all 'project'-files (without any user intervention) (considerable amount of time).
Next create all 'boot application'-files (with user intervention) (several minutes).Regards,
Edwin.
I see that CDS-30520 has been marked a duplicated of CDS-22407, which is now released under 3.5 SP2.
It is now possible to use the IScriptApplication.create_boot_applicaton(String filename) method instead of using the onlineapp object.
This is great, except that the visu files containing the images, text lists and webvisu files are not generated.
The compilation context is also not saved
Is there a simlar way to get those by specifying the path?
Originally created by: M.Schaber
Hi, Francois,
In our issue CDS-38204
The create_boot_application will be ammended with two new parameters:
If the project was changed since the last download or online change to a PLC, and you create a boot application with update_compile_info set to True, this will overwrite the current compiler reference context with the one matching the boot project (which no longer matches the one on the PLC). Thus, a direct conline change to the PLC will no longer work. On the other hand, the reference context now matches the created boot application, so you can login to any PLC on which you deploy the generated boot application. This updated compile context is also the one to be included into a project archive.
As a temporary workaround, you could also login to the PLC before creating the boot application, this should also write out the files.
I am trying to reproduce the same behaviour with the Automation Platform.
So far, everything is compiled and generated, except for the visu files.
Is there anyone that know how to export the visu files using the automation platform?
What I have done so far:
Thanks!
Hi francois.
Use GenerateCode(appGuid, false, false) instead of Compile(...).
Get the Visual Manager object below the application and, if the object supports the interface IVisualManagerObject4, use CreateVisualizationFiles(stPath, true).
BR
Martin
Thanks M.Keller, works like a charm!