Finding a Cell in the design

Discussion created by charles.ietswaard1 on Sep 26, 2013
Latest reply on Apr 23, 2014 by renjith.varughese

Hello All.



In my script I want to look for a cell by using



   Set DrawingCellobj = pcbDoc.Findcell(Dwg)                                                                                                                                                                            ' Look for the drawing cell

         If (DrawingCellObj is nothing) then                                                                                                                                                                                     ' If not found

             msgbox (Dwg & " Not Found in Design. Use Library Services to Load it !!!!!")                                                                                                                     ' Warn user for missing Cell and exit


        Set CompsCol = DrawingCellObj.components                                                                                                                                                                     ' Get the component that the cell is attached to                  

        If (CompsCol.count = 0) Then                                                                                                                                                                                             ' If not attached to any

            Call pcbDoc.PutComponent(Dwg, False, FrameX, FrameY, 0,,,1,False,epcbAnchorNone,epcbunitmm,epcbAngleUnitDegrees)                                               ' Place the drawing cell on the design






The problem is that it will not find mechanical/drawing cells that have never been placed on the board.


Is there a solution for this issue



regards, Charles