public interface IOccShieldWire : EPLAN.Harness.API.Interfaces.IApiObject, I3DOccurrence, IControlPath, IControlPathWithEnds, IExportable3D, IGraphicalOccurrence, IOccurrence, IReconnectable, IUserDefinedProperties, IWire, IWireCommon
public interface IOccShieldWire : EPLAN.Harness.API.Interfaces.IApiObject, I3DOccurrence, IControlPath, IControlPathWithEnds, IExportable3D, IGraphicalOccurrence, IOccurrence, IReconnectable, IUserDefinedProperties, IWire, IWireCommon
// Init API at first. HpdApi api = HpdApi.GetInstance(); // Open document. Project project = api.OpenProject(@"d:\MyProject.hxproj"); Variant variant = project.GetVariants()[0]; Designer designer = variant.GetWorkdesks().FirstOrDefault(d => d.Name == "Workdesk_1"); designer.Open(false, false); // Select cable. IOccCable cable = designer.GetAllOccurrences().OfType<IOccCable>().FirstOrDefault(c => c.Name == "ca_00002"); // Select its conductive shield. IOccConductiveShield shield = cable.CableSubParts.OfType<IOccConductiveShield>().FirstOrDefault(s => s.Name == "Shield 1"); // Get shield wire. IOccShieldWire shieldWire = shield.ShieldWire; // Select connector. IOccConnector connector = designer.GetAllOccurrences().OfType<IOccConnector>().FirstOrDefault(c => c.Name == "cn_00001"); // Find matching connected pin. IPinBase pin1 = connector.Pins.FirstOrDefault(tempPin1 => shieldWire.GetConnectedPins().Any(tempPin2 => tempPin1.ID == tempPin2.ID)); // Select second pin. IPinBase pin2 = connector.Pins.FirstOrDefault(p => p.Name == "2"); // Reconnect shield wire. shieldWire.Reconnect(pin1, pin2); // Save changes and close documents. designer.Save(); designer.Close(); project.Close();
Name | Description | |
---|---|---|
BendingRadiiCheck | Gets or sets the value of the 'Bending radii check' property of this occurrence. | |
BendingRadius | Gets the bending radius of this occurrence. | |
CableLength | Gets the cable length of this occurrence. | |
Children | Gets children occurrences of closest level in hierarchy of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IOccurrence) | |
Color | Gets or sets the color of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IWireCommon) | |
ConductiveShield | Parent conductive shield which is visible in the GUI. | |
ConnectedPins | Gets the names of pins to which this occurrence is connected. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IWire) | |
CrossSection | Get or set the cross section of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IWireCommon) | |
Exportable3D | Determines if this part is to be exported or not when using EPLAN.Harness.API.Projects.Documents.Designer.Export3DFile. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IExportable3D) | |
ID | Identifier of the API object. (Inherited from EPLAN.Harness.API.Interfaces.IApiObject) | |
Imprint | Gets or sets the imprint of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IWireCommon) | |
Interpolation | Gets or sets the interpolation algorithm of this occurrence. | |
IsRapid | Is the part a rapid prototype? (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IOccurrence) | |
IsValid | Is occurrence valid? (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IOccurrence) | |
Length | Gets the length of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IControlPath) | |
MaterialCode | Gets the material code of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IWireCommon) | |
Name | Gets or sets the name of the occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.I3DOccurrence) | |
OutsideDiameter | Get or set the outside diameter of this occurrence. Note: In the case of the rapid prototype cables, the outside diameter should be set on the top-level insulator. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IWireCommon) | |
Parents | Gets parent occurrences of closest level in hierarchy of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IOccurrence) | |
RawLength | Gets the raw length of this occurrence. | |
Selectable | Gets or sets the value of 'Selectable' property of this occurrence. | |
UserDefinedProperties | Gets or sets a list of user-defined properties of this occurrence. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IUserDefinedProperties) |
Name | Description | |
---|---|---|
Equals | (Inherited from System.IEquatable<IOccurrence>) | |
GetConnectedPins | Gets pins to which this wire is connected. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IReconnectable) | |
GetControlPoints | Gets all control point on this control path. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IControlPath) | |
Reconnect | Reconnect this shield from one grouped pin to another. (Inherited from EPLAN.Harness.API.Occurrences.Interfaces.IReconnectable) |