/// <summary> /// Check DynamicProperty /// </summary> /// <param name="sim">The current simulator.</param> /// <param name="id">The proerty name.</param> /// <param name="pdescs">the list of proerty.</param> /// <returns></returns> private static bool CheckDynamicProperty(WrappedSimulator sim, string id, Dictionary<string, PropertyDescriptor> pdescs) { // Check DynamicProperty bool dynamic = true; try { string randomID = null; do { randomID = Util.GenerateRandomID(32); } while (pdescs.ContainsKey(randomID)); // Test Set property. if (id.EndsWith(EcellObject.STEPPER)) { sim.SetStepperProperty(id, randomID, 0.0); } else { string fullId = Util.BuildFullPN(id, randomID); sim.SetEntityProperty(fullId, 0.0); } } catch (Exception) { dynamic = false; } return dynamic; }