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

V

vlsidesign

Guest
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.
 
On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:
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?
 
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 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."
 
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
 
On Dec 12, 5:12 pm, vlsidesign <ford...@gmail.com> wrote:
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 wrote, on 01/01/09 09:00:
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)
)
)
 
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?
 

Welcome to EDABoard.com

Sponsor

Back
Top