Forum Replies Created

    #80963

    Hi Claudette,

    Before you can retrieve data from the signal you first have to ensure that you calculated the project

    mydocument.CalculateProject(True, True)
    or
    mydocument.CalculateAllSweepIterations(True, True)

    depending on what type of simulation you are running.

    Then to send the data to a .txt file dynamically you can assign a value to a file location, ex. file = open(“SomeFilePath”),’w’), and then in a loop file.write(objSignal) to export the data.

    An example of this can be found in OptiSystemSDK_General (SDK_Result.py or SDK_OutputPort.py)

    Another possibility for why it isn’t working is that objOpticalSignalInput1 is not defined. If its copy and pasted from an example you would have to ensure that all variables are defined somewhere. ex objOpticalSignalInput1 = GetSampledSignalSignal()

    If you’re still having troubles you can either send me the exact error message or I can take a look at the code for you and debug it.

    Regards,
    Alex

    #83567

    Hi Claudette,

    Before you can retrieve data from the signal you first have to ensure that you calculated the project

    mydocument.CalculateProject(True, True)
    or
    mydocument.CalculateAllSweepIterations(True, True)

    depending on what type of simulation you are running.

    Then to send the data to a .txt file dynamically you can assign a value to a file location, ex. file = open(“SomeFilePath”),’w’), and then in a loop file.write(objSignal) to export the data.

    An example of this can be found in OptiSystemSDK_General (SDK_Result.py or SDK_OutputPort.py)

    Another possibility for why it isn’t working is that objOpticalSignalInput1 is not defined. If its copy and pasted from an example you would have to ensure that all variables are defined somewhere. ex objOpticalSignalInput1 = GetSampledSignalSignal()

    If you’re still having troubles you can either send me the exact error message or I can take a look at the code for you and debug it.

    Regards,
    Alex