Forum Discussion
Hi Wamboo,
thanks for helping!
you're right! I re-edit the script but the still got an error
Sub Test39
TestObject=Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly
If TestObject.WaitChild(lstbox_LandingSurface,15000).Exists Then
log.Message "the model browser is ready"
call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature
Else
End if
End Sub
so I adjusted again:
Sub Test36
If Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.WaitChild(Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.lstbox_LandingSurface,15000).Exists Then
log.Message "the model browser is ready"
call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature
Else
End if
End Sub
then tried this again:
Sub Test37
If Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.WaitChild(lstbox_LandingSurface,15000).Exists Then
log.Message "the model browser is ready"
call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature
Else
End if
End Sub
Can you try to use the method name, .WaitAliasChild instead of .WaitChild ?
check this topic for more information:
- tristaanogre6 years agoEsteemed Contributor
WaitChild requires two completely different sets of parameters than WaitAliasChild. I think Wamboo is correct here... you're using the wrong method.
But beyond that, your error on TestObject is probably due to being unable to find the object you're assigning to TestObject as well. You can't call "WaitChild" on an object that does not exist. So, you may need to do additional tests for existance further up the tree.
- StefanieYou6 years agoNew Contributor
tristaanogre Wamboo it works when using waitAliasChild, thanks a lot!!
tristaanogre I still have a question, what do you mean when you said "WaitChild requires two completely different sets of parameters"?
thanks,
stefanie
- tristaanogre6 years agoEsteemed Contributor
Sorry, my bad... I was thinking "FindChild"
Related Content
- 7 years ago
- 4 years ago
- 10 years ago
- 8 years ago
- 11 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago