public IReadOnlyList<TransformProperty<LengthProperty>> KeyPoints {get;}
public IReadOnlyList<TransformProperty<LengthProperty>> KeyPoints {get;}
Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.HpdApiNotInitializedException | Api is not in an initialized state. You can get current state from EPLAN.Harness.API.Studio.Status property. If API is uninitialized, you can initialize it by calling EPLAN.Harness.API.Studio.Init 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. |
The position of a key point is relative to occurrence's Position.
If this occurrence has no geometry, returns null. Check its EPLAN.Harness.API.Occurrences.BaseOccurrence.Childrens that may holds the geometry.
// Get the translatable occurrence from a designer. ITranslatable occ = GetOccurrence(); // Positions of keypoints relative to occurrence's Position. IReadOnlyList<TransformProperty<LengthProperty>> keyPoints = occ.KeyPoints; // Position of the occurrence. TransformProperty<LengthProperty> occPosition = occ.Position; // Absolute positions of occurrence key points. List<TransformProperty<LengthProperty>> absolutePositions = keyPoints.Select(kp => occPosition + kp).ToList();