New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't Add a MeasureType in C# Bindings #2795
Comments
Hmm that might be a weird SWIG order thing. I've never actually used that method, I have been using:
to set all the steps at once. In either case, you will need to construct either a OpenStudio.MeasureStepVector or OpenStudio.WorkflowStepVector and add the measure to that before calling setWorkflowSteps. You might try a few variations on that? I tried this in Ruby and got this error when calling the set steps with type method:
the following worked:
So I think you are right that there is a bug, I'd suggest going with the second method as a work around |
@macumber ,
I'll leave it up to you, @macumber if you would rather close the issue (since I have what I need now) or just leave it open until you can investigate the SWIG order for the MeasureType. |
Cool, good to hear you are unblocked. Let's leave this open for now since it still is a bug |
Hello OpenStudio Team,
Thanks, as always for this wonderful software. I have been playing with the WorkflowJSON class for the past day and it's been generally smooth sailing except for one small issue. I am just trying to use the
setMeasureStep()
for the Workflow and all of my attempts to use the MeasureType class in C# bindings have given in the following error that seems to be the result of a bug:Runtime error (ArgumentTypeException): expected SWIGTYPE_p_openstudio__MeasureType, got MeasureType
Here is some code that re-creates the issue using the compact_osw example that installs with OpenStudio:
Let me know if there's anything else that you need to recreate the issue and I apologize in advance if I'm just not understanding the MeasureType class correctly. I have tried a lot of variations on this that have resulted in the same error, which has lead me to believe that it's a bug and belongs here instead of on unmethours. Thanks again.
The text was updated successfully, but these errors were encountered: