Forum Discussion
You have assigned the following project variable,
Project.Variable.Obj1 = Some Object
Then somewhere below, you want to assign Project.Variable.Obj1 to something else, using
def foo(projVarObj, propNames=[], propValues=[])):
projVarObj = MainWindow.Find(propNames, propValues, 1000, True)
projVarObj is different to Project.Variable.Obj1. If projVarObj is None, then it means the Find method was not able to find the object based on the criteria given for propNames and propValues.
- ianlop2 years agoOccasional Contributor
I meant that projVarObj as a parameter is None. Even though I have already assigned it some value earlier in the execution. The .Find method was just something ill be doing with the project variable.
So what I have:
Project.Variable.Obj1 = Some object
but later on down the road when I don't want to type out Project.Variable.SomeObject in its entirety i want to make a method that generalizes the changing of one of my project variables through the method foo I wrote up there, I could have Proj.Variable.Obj1 through Obj5 and i want to change them this way for simplification purposes.
foo(Project.Variable.Obj1, PropNames[1,2,3], PropValues[1,2,3])
Related Content
- 5 years ago
Recent Discussions
- 19 hours ago
- 19 hours ago
- 5 days ago