public IList<ElectricalOption> ElectricalOptions {get;}
public IList<ElectricalOption> ElectricalOptions {get;}
Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.HpdApiNotInitializedException | Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it. |
EPLAN.Harness.API.Exceptions.ObjectInvalidException | The object is in invalid state. Obtain a new one. |
EPLAN.Harness.API.Exceptions.OccurrenceDeletedException | The exception that is thrown when you trying to access to already deleted occurrence. |
EPLAN.Harness.API.Exceptions.ArgumentException | Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property. |
Consists of:
// Obtain the occurrence before. OccWsPin pin = ... // Get the electrical options of this occurrence. IList<ElectricalOption> elOptions = pin.ElectricalOptions; // Set 'Option: 1' as active. ElectricalOption option = elOptions.FirstOrDefault(o => o.Name == "Option: 1"); if(option == null) // Resolve this issue. option.IsUsed = true; pin.ElectricalOptions = elOptions;