Hello guys hope you are having a great day. I am trying to learn python programing for visual components
and got stuck on something. hope you can help me it seems pretty silly and simple to me to fix but I just can’t figure it out.
I am trying to use the addStatement method to add some robot statements inside a while loop.
now my problem is I cannot get it to add the statement into the while loops scope.
this is how I am trying to do it.
I have a print statement near the end and the output from that reads <vcScope object at 0x00…>
which means that statement does have a vcScope object which in turn should have a addStatement method
but when I try the line statement.addStatement(xxxxxx) i get the error
NameError: Attribute or method ‘addStatement’ not found.
which makes no sense to me since the vcObject should have an “addStatement” method
I’m sure someone with experience knows immediately what I did wrong since this seems like pretty basic python programming so far.