I'm trying to find a way to place and/or move a drawing cell into the design.
Dwg = "A3_DWG"
set CellsCol = pcbdoc.cells ' Collect all the cells in the design
For Each Cell in CellsCol ' Search for the Drawing in the Cell Collection
if Cell.Name = Dwg Then ' And When found
set CompsColl = Cell.components ' Get the component that the drawing belongs to
for each Comp in CompsColl
if Comp.Placed = true Then ' If the cell is placed then
Call Comp.Move(FrameX, FrameY, epcbUnitCurrent) ' move it to the correct position
Else ' If the cell is not placed in the design
call pcbDoc.PutComponent(Dwg, False, FrameX, FrameY, 0) ' Place it in the design
When the drawing is already placed in the design, it is moved to the X,Y position defined by FrameX and FrameY. When the cell is in the design, but not placed I want to place it.
But it appears to be not possible with the PutComponent method, although no warnings/errors are issued
Any hints to put me in the right direction?