Quantcast
Channel: Mentor Graphics Communities : Document List - All Communities
Viewing all articles
Browse latest Browse all 397

Creating a new cell with Assembly Outline with Automation

$
0
0

This community already has an example on how to create a cell with automation, to be run from within Library Manager. That othe example also shows how to add a Placement outline.

As the addition of an Assembly outline is a little different, I thought that I'd provide that example here.

 

Assuming tht you have an open cell in the celleditor by use of something like celldoc = cell.Edit, you can now add the Placement outline like this :

 

Set outline = cedDoc.PutPlacementOutline( epcbSideMount, points, array, 0, 0, Nothing, epcbUnitCurrent ), where your array cuold be setup like this:

Dim array

    ReDim array(2,4)

    array(0,0) = minX :array(1,0) = minY :array(2,0) = 0.0

    array(0,1) = minX :array(1,1) = maxY :array(2,1) = 0.0

    array(0,2) = maxX :array(1,2) = maxY :array(2,2) = 0.0

    array(0,3) = maxX :array(1,3) = minY :array(2,3) = 0.0

    array(0,4) = minX :array(1,4) = minY :array(2,4) = 0.0

 

and thus, points = 5 in the above statement.

 

The difference when adding an Assembly outline is that you need to use different command - the documentation is not very clear about this.

 

The command for adding the Assembly Outline is outline = cedDoc.PutFabricationLayerGfx, or

 

'Document.PutFabricationLayerGfx(ByVal eType As EPcbFabricationType ,

    'ByVal eSide As EPcbSide ,

    'ByVal dGraphicsWidth As Double ,

    'ByVal nPnts As Long , safeArrayOfPnts As Variant ,

    '[ByVal bFilled As Boolean = False] ,

    '[ByVal pComponent As IMGCPCBComponent] ,

    '[ByVal eUnit As EPcbUnit = epcbUnitCurrent]) As IMGCPCBFabricationLayerGfx

   
Where

    'eType = epcbFabAssembly

    'In Cell Editor, set pComponent to 'Nothing'

    'eSide - use epcbSideTopOrBottom top get 'Mount' for Assy outline. use of epcbSideTop will only give you 'Top'

 

The command also uses an array - here is an example :

 

Set outline = cedDoc.PutFabricationLayerGfx(epcbFabAssembly,epcbSideToporBottom,0,points,array,False,Nothing,epcbUnitCurrent)

 

The attached example allows you to add a new cell with both Placement and Assembly Outline.

The example script shows how to create a new cell in a library

Library (Line 43), the Cell partition to use (Line 51), the name for the new cell (Line 62), and the padstack to use (Line 79 to 83) are hardcoded


Viewing all articles
Browse latest Browse all 397

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>