IPCB_Group interface
The base interface of PCB objects that contain other primitives: IPCB_Component, IPCB_LibComponent, IPCB_Net, IPCB_Polygon, IPCB_SplitPlane, IPCB_Coordinate, IPCB_Dimension and their descendant interfaces.
public interface IPCB_Group : IPCB_Primitive
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_Primitive
Derived: IPCB_Component, IPCB_Coordinate, IPCB_Dimension, IPCB_LibComponent, IPCB_Net, IPCB_Polygon, IPCB_SplitPlane
Remarks
A group is composed of child primitives such as arcs, tracks and fills: for example, a polygon consists of tracks and arcs, and a footprint in a PCB library of arcs, pads and tracks.
GroupIterator_Create and GroupIterator_Destroy iterate over the child primitives; AddPCBObject and RemovePCBObject add and remove them. XLocation and YLocation are the reference point of the group.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| LayerUsed | bool | get; set | Whether a child primitive of the group is on the given layer. |
| PrimitiveLock | bool | get; set | Whether the child primitives of the group can be edited individually or only as part of the group. |
| XLocation | int | get; set | The X coordinate of the reference point of the group, in internal units (10,000 per mil). |
| YLocation | int | get; set | The Y coordinate of the reference point of the group, in internal units (10,000 per mil). |
LayerUsed
Whether a child primitive of the group is on the given layer.
bool GetState_LayerUsed(TV6_Layer argL);
void SetState_LayerUsed(TV6_Layer argL, bool argValue);
Type: bool · Access: read/write · Index: argL (TV6_Layer)
The accessors are extension methods of IPCB_GroupHelper (using PCB;).
The value is valid after SetState_LayersUsedArray has run. Until the layer usage of the group has been built (by SetState_LayersUsedArray or by assigning a value), reading returns false.
PrimitiveLock
Whether the child primitives of the group can be edited individually or only as part of the group.
bool GetState_PrimitiveLock();
void SetState_PrimitiveLock(bool argValue);
Type: bool · Access: read/write
XLocation
The X coordinate of the reference point of the group, in internal units (10,000 per mil).
int GetState_XLocation();
void SetState_XLocation(int argX);
Type: int · Access: read/write
Assigning a different value moves the group with MoveToXY, keeping its Y coordinate.
Examples: Extension_PCBUndoRedo, Extension_PcbLibComponentToSTEP, Extension_PlaceAndMovePcbComponent
YLocation
The Y coordinate of the reference point of the group, in internal units (10,000 per mil).
int GetState_YLocation();
void SetState_YLocation(int argY);
Type: int · Access: read/write
Assigning a different value moves the group with MoveToXY, keeping its X coordinate.
Examples: Extension_PcbLibComponentToSTEP, Extension_PlaceAndMovePcbComponent
Methods
| Method | Returns | Description |
|---|---|---|
| AddPCBObject | void | Adds a primitive to the group as a child primitive. |
| FastSetState_XSizeYSize | bool | |
| FreePrimitives | void | Destroys all child primitives of the group and leaves the group empty. |
| GetPrimitiveAt | IPCB_Primitive | Returns the child primitive at the given position among the group's children of the given object kind. |
| GetPrimitiveCount | int | Returns the number of child primitives of the group whose object kind is in the given set. |
| GroupIterator_Create | IPCB_GroupIterator | Creates an iterator over the child primitives of the group. |
| GroupIterator_Destroy | void | Releases an iterator created by GroupIterator_Create. |
| RemovePCBObject | void | Removes a child primitive from the group. |
| ReplicateWithChildren | IPCB_Primitive | Returns a copy of the group that contains copies of all its child primitives. |
| SetState_LayersUsedArray | void | Rebuilds the layer usage of the group that LayerUsed reports, marking the layer of every child primitive as used. |
| SetState_XSizeYSize | bool | Recalculates the size of every child primitive and then the bounds of the group. |
AddPCBObject
Adds a primitive to the group as a child primitive.
void AddPCBObject(IPCB_Primitive argPCBObject);
void AddPCBObject(object argPCBObject);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argPCBObject | IPCB_Primitive | value | The primitive to add: an arc, pad, via, track, connection, text, fill, rule, embedded board, region or component body. For null or any other kind of object the method does nothing. |
Returns: nothing (void)
The first overload is an extension method of IPCB_GroupHelper (using PCB;) with typed parameters; the second is declared by the interface.
When the group is a component, a net or a polygon, the primitive is first removed from the component, net or polygon respectively that it belongs to. To place a new primitive in a footprint, add it to the library board with IPCB_Board.AddPCBObject and then to the footprint with AddPCBObject.
Examples: Extension_CreatePCBLib
FastSetState_XSizeYSize
No description yet.
bool FastSetState_XSizeYSize();
Returns: bool
FreePrimitives
Destroys all child primitives of the group and leaves the group empty.
void FreePrimitives();
Returns: nothing (void)
GetPrimitiveAt
Returns the child primitive at the given position among the group's children of the given object kind.
IPCB_Primitive GetPrimitiveAt(int argI, TObjectId argObjectId);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argI | int | value | The position of the child primitive, starting at 1; GetPrimitiveCount returns the number of children. |
argObjectId | TObjectId | value | The object kind of the child primitives. |
Returns: IPCB_Primitive
Extension method of IPCB_GroupHelper (using PCB;).
Returns null when the group has no child of that kind at the given position.
See also: IPCB_Group.GroupIterator_Create, IPCB_GroupIterator, IPCB_Group.GroupIterator_Destroy
GetPrimitiveCount
Returns the number of child primitives of the group whose object kind is in the given set.
int GetPrimitiveCount(TObjectSet argObjectSet);
int GetPrimitiveCount(ITransportSet argObjectSet);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argObjectSet | TObjectSet | value | The object kinds (TObjectId values) to count. |
Returns: int
The first overload is an extension method of IPCB_GroupHelper (using PCB;) with typed parameters; the second is declared by the interface.
GroupIterator_Create
Creates an iterator over the child primitives of the group.
IPCB_GroupIterator GroupIterator_Create();
Returns: IPCB_GroupIterator
Extension method of IPCB_GroupHelper (using PCB;).
Release the iterator with GroupIterator_Destroy.
GroupIterator_Destroy
Releases an iterator created by GroupIterator_Create.
void GroupIterator_Destroy(ref IPCB_GroupIterator argIterator);
void GroupIterator_Destroy(ref object argIterator);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argIterator | IPCB_GroupIterator | ref | The iterator to release; the variable is set to null. |
Returns: nothing (void)
The first overload is an extension method of IPCB_GroupHelper (using PCB;) with typed parameters; the second is declared by the interface.
RemovePCBObject
Removes a child primitive from the group.
void RemovePCBObject(IPCB_Primitive argPCBObject);
void RemovePCBObject(object argPCBObject);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argPCBObject | IPCB_Primitive | value | The primitive to remove: an arc, pad, via, track, connection, text, fill, rule, embedded board, region or component body. For null or any other kind of object the method does nothing. |
Returns: nothing (void)
The first overload is an extension method of IPCB_GroupHelper (using PCB;) with typed parameters; the second is declared by the interface.
ReplicateWithChildren
Returns a copy of the group that contains copies of all its child primitives.
IPCB_Primitive ReplicateWithChildren();
Returns: IPCB_Primitive
Extension method of IPCB_GroupHelper (using PCB;).
Add the copy to a board with IPCB_Board.AddPCBObject.
SetState_LayersUsedArray
Rebuilds the layer usage of the group that LayerUsed reports, marking the layer of every child primitive as used.
void SetState_LayersUsedArray();
Returns: nothing (void)
When the group does not belong to a board, all layers are left marked as unused.
SetState_XSizeYSize
Recalculates the size of every child primitive and then the bounds of the group.
bool SetState_XSizeYSize();
Returns: bool
The selection rectangle of the group becomes the rectangle that encloses the selection rectangles of its child primitives.
Inherited members
- From IPCB_Primitive: AllowGlobalEdit, BeginModify, Board, BoundingRectangle, BoundingRectangleChildren, BoundingRectangleForPainting, BoundingRectangleForSelection, CancelModify, Component, Coordinate, DescriptorString, DetailString, Dimension, DrawAsPreview, DRCError, Enabled, Enabled_Direct, Enabled_vComponent, Enabled_vCoordinate, Enabled_vDimension, Enabled_vNet, Enabled_vPolygon, EnableDraw, EndModify, Export_ToParameters, FlipXY, GraphicallyInvalidate, Handle, Identifier, InBoard, InComponent, InCoordinate, Index, InDimension, InNet, InPolygon, InSelectionMemory, IsAssyTestPoint_Bottom, IsAssyTestPoint_Top, IsElectricalPrim, IsFreePrimitive, IsHidden, IsKeepout, IsPreRoute, IsSaveable, IsTenting, IsTenting_Bottom, IsTenting_Top, IsTestPoint_Bottom, IsTestPoint_Top, Layer, MiscFlag1, MiscFlag2, MiscFlag3, Moveable, MoveByXY, MoveToXY, Net, ObjectID, ObjectIDString, PadCacheRobotFlag, PasteMaskExpansion, Polygon, PolygonOutline, PowerPlaneClearance, PowerPlaneConnectStyle, PowerPlaneReliefExpansion, Preview, ReliefAirGap, ReliefConductorWidth, ReliefEntries, Replicate, RequiredParamterSpace, RotateBy, Selected, SolderMaskExpansion, SwapLayerPairs, TearDrop, UnionIndex, UniqueId, UniqueID, Used, UserRouted, V7Layer, ViewableObjectID
Returned by
IPCB_BoardOutlineClearanceConstraint.GetObstacleTracks, IPCB_Net.GetLogicalNet, IPCB_Net.GetSubnets