SKILL Code to edit symbol pin shapes

N

none

Guest
In composer there is an interactive function for creating new pin shapes
in a symbol. On this form you can choose a square shape for a pin shape,
or a block shape which is a square with a triangle that points to in,
out or both directions with inout. If I choose the block pin type I
get this second kind of pin shape.


I have been looking around in the data structures for the shape that
gets created for a pin.

in a symbol cvId I find the pin shapes in cvId~>shapes. The
rectangle shaped pin showes up as objType rect and the other is a
polygon with 6 or 7 points.

The rect has no points only a bBox.
The polygon has items npoints and a list of points.
----------------------------------------------------

1. Is there a skill function that will create a new pin shape, using
this block like pin shape?

2. If I already have pins how can I easily edit the pins shapes to
create the block type pin shapes.

I am thinking the following might work.
foreach(s cvId~>shapes
Find objType = rect pins
get the x,y point of the center on the rect bBox
get other properties of the pin, terminal name, direction or pin,
Delete the pin shape
Add a new pin shape at the same x,y with the pin shape default set to
block.

Does anyone have any other ideas on this.

3. Is their a .cdsenv default for the default pin shape to use?

Thanks.
 
Hi Nun. nice hat !

1- You should look what the schematic view to symbol view make. Check the symbol
generation flow, the "^tsg" functions.
2- See what "^db.+rite" makes from a symbol view.

And if you find something interesting, please post it here.

none wrote:
In composer there is an interactive function for creating new pin shapes
in a symbol. On this form you can choose a square shape for a pin shape,
or a block shape which is a square with a triangle that points to in,
out or both directions with inout. If I choose the block pin type I
get this second kind of pin shape.


I have been looking around in the data structures for the shape that
gets created for a pin.

in a symbol cvId I find the pin shapes in cvId~>shapes. The
rectangle shaped pin showes up as objType rect and the other is a
polygon with 6 or 7 points.

The rect has no points only a bBox.
The polygon has items npoints and a list of points.
----------------------------------------------------

1. Is there a skill function that will create a new pin shape, using
this block like pin shape?

2. If I already have pins how can I easily edit the pins shapes to
create the block type pin shapes.

I am thinking the following might work.
foreach(s cvId~>shapes
Find objType = rect pins
get the x,y point of the center on the rect bBox
get other properties of the pin, terminal name, direction or pin,
Delete the pin shape
Add a new pin shape at the same x,y with the pin shape default set to
block.

Does anyone have any other ideas on this.

3. Is their a .cdsenv default for the default pin shape to use?

Thanks.
 
There is a skill function schCreateSymbolPin that works. I was
looking for how to create a block style pin. There are cells
in the basic library (blockipin symbol) blockiopin blockopin. When
these cells are provided to the above function a symbol is created.

Note: only the symbol is created.

My approach to replacing all square pins with block follows.

Loop thru symbol cvId~>shapes

If the objType = "rect" and the shp~>term~>name != "" a pin has been
found
shp~>children returns a the list of labels on the pin.
Get the orientation from the label and create new pins at the center
point of the rect bBox.

Add labels to this pin from the children of the rect. (I function with
glue in name, Glue the children to the new shp created.

delete the old pin.

fogh <cad_support@skipthisandunderscores.catena.nl> wrote in
news:418bb650$0$56875$e4fe514c@dreader8.news.xs4all.nl:

Hi Nun. nice hat !

1- You should look what the schematic view to symbol view make. Check
the symbol generation flow, the "^tsg" functions.
2- See what "^db.+rite" makes from a symbol view.

And if you find something interesting, please post it here.

none wrote:
In composer there is an interactive function for creating new pin
shapes in a symbol. On this form you can choose a square shape for a
pin shape, or a block shape which is a square with a triangle that
points to in, out or both directions with inout. If I choose the
block pin type I get this second kind of pin shape.


I have been looking around in the data structures for the shape that
gets created for a pin.

in a symbol cvId I find the pin shapes in cvId~>shapes. The
rectangle shaped pin showes up as objType rect and the other is a
polygon with 6 or 7 points.

The rect has no points only a bBox.
The polygon has items npoints and a list of points.
----------------------------------------------------

1. Is there a skill function that will create a new pin shape, using
this block like pin shape?

2. If I already have pins how can I easily edit the pins shapes to
create the block type pin shapes.

I am thinking the following might work.
foreach(s cvId~>shapes
Find objType = rect pins
get the x,y point of the center on the rect bBox
get other properties of the pin, terminal name, direction or
pin, Delete the pin shape
Add a new pin shape at the same x,y with the pin shape default set
to
block.

Does anyone have any other ideas on this.

3. Is their a .cdsenv default for the default pin shape to use?

Thanks.
 

Welcome to EDABoard.com

Sponsor

Back
Top