EDAboard.com | EDAboard.de | EDAboard.co.uk | WTWH Media

easy way to copy pin and text display in Skill??

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - Cadence - easy way to copy pin and text display in Skill??

vlsidesign
Guest

Sat Dec 13, 2008 2:44 am   



I wanted to copy a pin and its associated text display. When I use the
dbCopyFig it just gets the rectangle and not the text display. There
doesn't seem to be an skill function that will make this easy, but I
will need to do some work. Any thoughts are appreciated.

layoutDesign
Guest

Tue Dec 16, 2008 2:44 am   



On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:
Quote:
I wanted to copy a pin and its associated text display. When I use the
dbCopyFig it just gets the rectangle and not the text display. There
doesn't seem to be an skill function that will make this easy, but I
will need to do some work. Any thoughts are appreciated.

dbCopyFig doesn't copy connectivity. So I am trying to use
"leCreatePin" instead. So what I have so far, is that I look at the
pin (that I want to copy) object properties, and save it, and then I
pass some of those values to the "leCreatePin" function call, and that
seems like it will work, but I am still missing associated text
display. I am not sure if I will need to use dbGetOverlaps on the pin
and find the text display or not? or if there is a simpler way?

layoutDesign
Guest

Tue Dec 16, 2008 11:44 pm   



On Dec 15, 4:46 pm, layoutDesign <ford...@gmail.com> wrote:
Quote:
On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:

dbCopyFig doesn't copy connectivity. So I am trying to use
"leCreatePin" instead. So what I have so far, is that I look at the
pin (that I want to copy) object properties, and save it, and then I
pass some of those values to the "leCreatePin" function call, and that
seems like it will work, but I am still missing associated text
display. I am not sure if I will need to use dbGetOverlaps on the pin
and find the text display or not? or if there is a simpler way?

Wasn't sure on whether to use leCreatePin or dbCreatePin... Andrew has
a previous post that clarifies which should be used.

Andrew Beckett says the following:
"dbCreatePin is a lower level function - you need to have created the
net, terminal and shape, and then create the pin (actually you can
omit creating the terminal).
leCreatePin takes care of creating the pin shape, and the net, and the
terminal. It also sets various attributes like the terminal direction,
and the pin access directions,etc."

layoutDesign
Guest

Wed Dec 17, 2008 11:23 pm   



On Dec 16, 2:23 pm, layoutDesign <ford...@gmail.com> wrote:
Quote:
On Dec 15, 4:46 pm, layoutDesign <ford...@gmail.com> wrote:

On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:

dbCopyFig doesn't copy connectivity. So I am trying to use
"leCreatePin" instead. So what I have so far, is that I look at the
pin (that I want to copy) object properties, and save it, and then I
pass some of those values to the "leCreatePin" function call, and that
seems like it will work, but I am still missing associated text
display. I am not sure if I will need to use dbGetOverlaps on the pin
and find the text display or not? or if there is a simpler way?

Wasn't sure on whether to use leCreatePin or dbCreatePin... Andrew has
a previous post that clarifies which should be used.

Andrew Beckett says the following:
"dbCreatePin is a lower level function - you need to have created the
net, terminal and shape, and thencreatethe pin (actually you can
omit creating the terminal).
leCreatePin takes care of creating the pin shape, and the net, and the
terminal. It also sets various attributes like the terminal direction,
and the pin access directions,etc."

tmpPin = car(pinList) ;;grab pin template so I can create duplicates
newPin = leCreatePin(cv tmpPin~>fig~>lpp "rectangle" tmpPin~>fig~>bBox
tmpPin~>net~>name "inputOutput" tmpPin~>accessDir
textId = dbCreateTextDisplay(
tmpPin~>net~>term
newPin
list(tmpPin~>fig~>layerName "label")
t
centerBox(tmpPin~>fig~>bBox)
car(tmpPin~>fig~>children)~>justify
car(tmpPin~>fig~>children)~>orient
car(tmpPin~>fig~>children)~>font
car(tmpPin~>fig~>children)~>height
t nil t nil t "name"
)
textId~>parent = newPin~>fig ;; attach to fig

layoutDesign
Guest

Wed Dec 17, 2008 11:26 pm   



On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:
Quote:
There doesn't seem to be an skill function that will make this easy

Answer: Correct, there is no easy way through Skill

Andrew Beckett
Guest

Fri Jan 02, 2009 9:29 am   



Andrew Beckett wrote, on 01/01/09 09:00:
Quote:
layoutDesign wrote, on 12/17/08 21:23:
On Dec 16, 2:23 pm, layoutDesign <ford...@gmail.com> wrote:
On Dec 15, 4:46 pm, layoutDesign <ford...@gmail.com> wrote:

On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:
dbCopyFig doesn't copy connectivity. So I am trying to use
"leCreatePin" instead. So what I have so far, is that I look at the
pin (that I want to copy) object properties, and save it, and then I
pass some of those values to the "leCreatePin" function call, and that
seems like it will work, but I am still missing associated text
display. I am not sure if I will need to use dbGetOverlaps on the pin
and find the text display or not? or if there is a simpler way?
Wasn't sure on whether to use leCreatePin or dbCreatePin... Andrew has
a previous post that clarifies which should be used.

Andrew Beckett says the following:
"dbCreatePin is a lower level function - you need to have created the
net, terminal and shape, and thencreatethe pin (actually you can
omit creating the terminal).
leCreatePin takes care of creating the pin shape, and the net, and the
terminal. It also sets various attributes like the terminal direction,
and the pin access directions,etc."

tmpPin = car(pinList) ;;grab pin template so I can create duplicates
newPin = leCreatePin(cv tmpPin~>fig~>lpp "rectangle" tmpPin~>fig~>bBox
tmpPin~>net~>name "inputOutput" tmpPin~>accessDir
textId = dbCreateTextDisplay(
tmpPin~>net~>term
newPin
list(tmpPin~>fig~>layerName "label")
t
centerBox(tmpPin~>fig~>bBox)
car(tmpPin~>fig~>children)~>justify
car(tmpPin~>fig~>children)~>orient
car(tmpPin~>fig~>children)~>font
car(tmpPin~>fig~>children)~>height
t nil t nil t "name"
)
textId~>parent = newPin~>fig ;; attach to fig

To find existing textDisplays, many objects have an attribute
textDisplays which is a list of textDisplays pointing at this object.

The attached code may be of help when understanding how to recreate text
displays.

Regards,

Andrew.



Sending again, as posts with attachments don't seem to make it through. Including the code in the post instead...

Andrew.

/* abFxNetNames.il

Author A.D.Beckett
Group Structured Custom, Cadence Design Systems Ltd.
Machine SUN
Date Feb 06, 1996
Modified
By

abFixNetNames finds all the terminals in the current or supplied cellView
which have net names different from the terminal name, and fixes this

***************************************************

SCCS Info: @(#) abFixNetNames.il 10/04/02.12:45:31 1.1

*/

(procedure (abFixNetNames @optional (cellView (geGetEditCellView)))
(let (termName newNet newTerm newTextDisplay)
(foreach terminal (dbGetq cellView terminals)
(unless (equal (setq termName (dbGetq terminal name))
(dbGetq (dbGetq terminal net) name))
/* set terminal name back to the net name, so that
we can create the new terminal properly */
(dbSetq terminal (dbGetq (dbGetq terminal net) name) name)
/* create the net for the desired terminal name */
(setq newNet (dbMakeNet cellView termName))
/* create a terminal for this net */
(unless (setq newTerm (dbGetq newNet term))
(setq newTerm (dbCreateTerm newNet termName
(dbGetq terminal direction))))
/* set the net for all the pins to be the new net */
(foreach pin (dbGetq terminal pins)
(dbSetq pin newNet net))
/* recreate the textDisplays */
(foreach textDisplay (dbGetq terminal textDisplays)
(setq newTextDisplay
(dbCreateTextDisplay newTerm newTerm
(dbGetq textDisplay lpp)
t
(dbGetq textDisplay xy)
(dbGetq textDisplay justify)
(dbGetq textDisplay orient)
(dbGetq textDisplay font)
(dbGetq textDisplay height)
(dbGetq textDisplay isDrafted)
(dbGetq textDisplay isOverbar)
(dbGetq textDisplay isVisible)
(dbGetq textDisplay isNameVisible)
(dbGetq textDisplay isValueVisible)
"name" nil))
/* attach the label to the figure for the pin */
/* don't know the db way of doing this */
(leAttachFig newTextDisplay (dbGetq textDisplay parent))
/* nasty bodge to get the bounding box of the label
correct */
(dbMoveFig newTextDisplay cellView nil)
)
/* delete the old terminal and net */
(dbDeleteObject (dbGetq terminal net))
))
t))

(procedure (abMakeTermsGlobal cellView listOfTerms)
(let (term)
(foreach termName listOfTerms
(setq term (dbFindTermByName cellView termName))
(when term
(dbSetq term (strcat termName "!") name)
)
)
(abFixNetNames cellView)
)
)


Guest

Wed Feb 27, 2019 1:45 pm   



The pin is present in the layout and it's label is present somewhere how to move the pin label to it's respective pin position?

elektroda.net NewsGroups Forum Index - Cadence - easy way to copy pin and text display in Skill??

Ask a question - edaboard.com

Arabic version Bulgarian version Catalan version Czech version Danish version German version Greek version English version Spanish version Finnish version French version Hindi version Croatian version Indonesian version Italian version Hebrew version Japanese version Korean version Lithuanian version Latvian version Dutch version Norwegian version Polish version Portuguese version Romanian version Russian version Slovak version Slovenian version Serbian version Swedish version Tagalog version Ukrainian version Vietnamese version Chinese version Turkish version
EDAboard.com map