0

I have successfully accessed many different Aspen Plus variables through COM interface using Python (win32com), but failed to do so for the following variable, using the same command.

AspenPlus.Tree.FindNode("\Data\Reactions\Reactions\ReactionABC\Input\RVALUE_LIST\#1").Value = 11

However, this exact same command worked well using Matlab. It appears that python failed to deal with "#". How to fix this? Any suggestion or help will be highly appreciated.

1 Answer 1

0

I know it has been a while since you asked this question. But I have recently had a similar issue I worked by doing the following:

AspenPlus.Tree.FindNode(r"\Data\Reactions\Reactions\ReactionABC\Input\RVALUE_LIST\#1").Value = 11

By including the r before the string you tell win32com that the string literal is raw; if you don't do this it will interpret \#1 as a smiley face, which has no place in the Aspen Variable Tree.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.