Skip to content

How to set reference value #153

Answered by PanekOndrej
hui-zhou-a asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ring630 ,

this is not currently possible directly through Parameter object, since it's not connected to the server nor shares the same address space with optiSLang project, it's data class that stores copy parameter's properties.

To explain what happened:

In following line of code you queried server to obtain first parameter's data and modified reference value in your local copy.

op.parameter_manager.get_parameters()[0].reference_value = 1

Then you queried server again to obtain first parameter's reference value ( ... compared with 1 and used assert).

assert op.parameter_manager.get_parameters()[0].reference_value == 1

Development of pyOptiSLang is still in progress, we are working o…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rfahlberg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants