Automatically outputing PowerPoint by coding in hyperview

Zaily
Zaily Altair Community Member
edited August 2021 in Community Q&A

hi,guys!In hyperview, I am trying to automatically report  in the form of  PPT by coding. My codes is as follows:

proc ::AutoCreateReport::AutoCreatePPT {pptpath} {

set templatepath $pptpath;

   hwi OpenStack
   hwi GetSessionHandle sessionH
   sessionH GetPublishingHandle pub
   pub GetPPTPublishHandle ppt
   ppt SetSyncAtPublish false
   ppt SetSyncHgNotes false
   ppt SetDestination 'disk'
   ppt SetPathOnDisk $templatepath
   ppt Publish
   ppt ReleaseHandle
   pub ReleaseHandle
   sessionH ReleaseHandle
   hwi CloseStack
}

But there is always the error that is as follows:

::hw::publish::ppt::GUI::PublishCB
1
    while executing
'# Compiled -- no source code available
error 'called a copy of a compiled script''

 

It is so appreciate to you for helping me solve it.

Answers

  • Sai91
    Sai91 Altair Community Member
    edited June 2021

    Hello,

     

    Were you able to solve this ? Please let me know.

     

  • Sai91
    Sai91 Altair Community Member
    edited June 2021

    I was able to publish the session to ppt, when I removed hwi CloseStack from my script. 

  • Sandesh Gandhi_20689
    Sandesh Gandhi_20689
    Altair Employee
    edited June 2021

    Hi Zaily,

    You can try out the new Report functionality in HyperWorks. The advantage of this tool is that it will create the report the same way irrespective of your OS and office/ google doc application and its version.

     

    I have attached a couple scripts. The one that says "classic" in the name can be used in the HyperWorks versions 2021 and onwards in the old user interface.

     

    If you're running the script manually and not in batch, I recommend the "Next Generation" script, which is applicable to the next generation user interface only. This code very simple.

  • Zaily
    Zaily Altair Community Member
    edited August 2021
    Sai91 said:

    Hello,

     

    Were you able to solve this ? Please let me know.

     

    No, I think that's an incompatible problem between the HyperWorks and the offices. Sorry, I have no idea to solve it. 

  • Zaily
    Zaily Altair Community Member
    edited August 2021
    Sai91 said:

    I was able to publish the session to ppt, when I removed hwi CloseStack from my script. 

    Even if I keep this command, I still publish the session to ppt. If I only output a session to PPT, I can succeed almost every time. But when I code some commands to loop output some session to ppt, there are always errors. 

  • Zaily
    Zaily Altair Community Member
    edited August 2021
    Sai91 said:

    Hello,

     

    Were you able to solve this ? Please let me know.

     

    Thanks for your advices!!!