WD0001 Posted October 29, 2024 Posted October 29, 2024 In VB.Net, you can use an expression like "TypeOf obj Is Node", which will return True if obj is a Node, or if it is a type that inherits from Node. How can I use a Simio expression to do something similar, to return True if an object is either a Server, or is subclassed from a Server (or a subclass of a subclass of a Server, etc)? Simio's "Is" keyword doesn't respect polymorphism.
ViniciusF Posted October 30, 2024 Posted October 30, 2024 Hi, it worked just fine with a subclassed server here:
ViniciusF Posted October 30, 2024 Posted October 30, 2024 (edited) Using a object reference state variable named "Test" on the ModelEntity: (Assign step was just ModelEntity.Test -> Server) Edited October 30, 2024 by ViniciusF
WD0001 Posted October 30, 2024 Author Posted October 30, 2024 Ok, it is working now. I'm not sure what I changed to fix it, though.
Recommended Posts