How to use ObjectResolvedScript

Posted by: jsnahil on 3 April 2020, 3:42 am EST

    • Post Options:
    • Link

    Posted 3 April 2020, 3:42 am EST

    I have two questions relating to running scripts.

    1. How do I debug script?
    2. The following script stopped working many months. Why?
      
    
       Public Sub AddDocument(ByRef doc As S1PrintDocument,
                                                  ByVal EnsureEvenPages As Boolean)
            If EnsureEvenPages  Then                                     
                 Dim re As RenderEmpty = New RenderEmpty With {
                                                                            .ObjectResolvedScript = Script
                                                                     }
                 doc.ScriptingOptions.Language = Scripting.ScriptLanguageEnum.VB
                 doc.Body.Children.Add(re)
                 doc.Body.Children.Add(New RenderEmpty())
             End If
             MyBase.Items.Add(doc)
        End If
    
          doc.Dispose()
          doc = Nothing
          GC.Collect()
          GC.WaitForPendingFinalizers()
    
       End Sub
    
    
  • Posted 3 April 2020, 9:03 pm EST

  • Posted 5 April 2020, 9:43 pm EST

    Hi Joginder,

    To replicate the issue at our end we need your stripped-down sample with that has the above-given script and also mention the control version in which it working fine.

    Regards,

    Prabhat Sharma.

  • Posted 6 April 2020, 1:02 am EST

    Hi Prabhat,

    Thanks for your response. My sample woks fine in one environment but does not do anything in another. Is it possible to check if the script is executed? and step through the VBScript?

    Regards,

    Joginder

  • Posted 6 April 2020, 8:04 pm EST

    Hi Joginder,

    Sorry but it is not possible to debug the script.

    To replicate the issue at our end we need your sample and the evnvironment detail in which it is not working fine.

    It will help us to assit you in a better way and if needed we will forward it to devs.

    Regards,

    Prabhat Sharma.

  • Posted 7 April 2020, 2:01 am EST

    Hi Prabhat,

    Thanks for your response. I created a test application and it always works. If I not able to debug VBScript I am happy to close this issue.

    Regards,

    Joginder

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels