charles.ietswaard1

Moving/placing a drawing cell into the design.

Discussion created by charles.ietswaard1 on Sep 24, 2013
Latest reply on Sep 25, 2013 by charles.ietswaard1

Hello All,

 

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

                    End If

               Next

          End if

     Next  

 

 

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?

 

Regards, Charles

Outcomes