Skip to content
Discussion options

You must be logged in to vote

Hi @JonathonMcMullan Yes there is corresponding API functionality available. You can use the register_location_as_internal_variable method. Unfortunately, the functionality for registering internal variables is still pretty raw and inconvenient via pyoptislang, you need to know exactly in what format you need to provide the location definition. We plan to improve this in the future.

Here is a snippet on how you can achieve this:

# Print the currently registered internal variables (maybe first create some via optiSLang GUI)
calculator_node=osl.application.project.root_system.find_nodes_by_name("Calculator")[0]
internal_vars=calculator_node.get_internal_variables()
print(internal_vars[0]["l…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JonathonMcMullan
Comment options

Answer selected by JonathonMcMullan
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