Home > Community > Forums > Custom IC SKILL > attach label to a pin as a 'children'

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 attach label to a pin as a 'children' 

Last post Thu, Dec 13 2012 2:12 AM by ebecheto. 3 replies.
Started by ebecheto 12 Dec 2012 07:49 AM. Topic has 3 replies and 889 views
Page 1 of 1 (4 items)
Sort Posts:
  • Wed, Dec 12 2012 7:49 AM

    • ebecheto
    • Top 200 Contributor
    • Joined on Fri, Oct 10 2008
    • Villeurbanne, Rhone
    • Posts 39
    • Points 705
    attach label to a pin as a 'children' Reply

    Dear all,

     I have only pins in the layout and I want to attach a label to it. Unfortunatelly the 'children' cannot be set.

    Anyone knows how to set it correctly?

    Here is the example of my code. 

    Regards,

     

    Normal 0 21 false false false FR X-NONE X-NONE MicrosoftInternetExplorer4

    /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    cv=geGetWindowCellView()
    p=caar(cv~>terminals~>pins)
    foreach(p cv~>terminals~>pins
    p1=car(p)
    p1~>net~>name
    f1=car(p1~>figs)
    unless(f1~>children f1~>children=
    dbCreateLabel(cv list(f1~>layerName  "label" ) centerBox(f1~>bBox)
    p1~>net~>name "centerLeft" "R0" "roman" 0.5)))
     
     
    *Error* setSGq: (DB-370034): dbSetq: Cannot set attribute - children
     

     

    • Post Points: 35
  • Wed, Dec 12 2012 7:56 AM

    Re: attach label to a pin as a 'children' Reply
    Don't set the children - set the parent attribute on the object being attached. That's because an object can have one parent but multiple children. Setting the parent attribute will automatically update the children attribute on the parent object (if that's not too confusing...)

    Andrew
    • Post Points: 5
  • Wed, Dec 12 2012 7:57 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: attach label to a pin as a 'children' Reply

    You can set the parent attribute on the pin shape instead. However, you shoud create textDisplays for pins rather than labels. A textDisplay will display the pin name (much like a label), but when the pin's connectivity/name changes, the display's value will change as well. The textDisplay will also be attached to the pin automatically since it by nature is a child of the pin.

    dbCreateTextDisplay(
    d_associateId
    d_ownerId
    ( tx_layer [ t_purpose ] )
    l_displayFlags
    l_point
    t_just
    t_orient
    t_font
    x_height
    [ g_isDrafted [ g_isOverbar [ g_isVisable [ g_isNameVisible [ g_isValueVisible [ t_attrOrParamName [ g_isParamAssoc ] ] ] ] ] ] ]
    )

    Derek

    • Post Points: 20
  • Thu, Dec 13 2012 2:12 AM

    • ebecheto
    • Top 200 Contributor
    • Joined on Fri, Oct 10 2008
    • Villeurbanne, Rhone
    • Posts 39
    • Points 705
    Re: attach label to a pin as a 'children' Reply

     Thantks Dereck,

    That was exactly what I was missing. Now I have the same behaviour as when I click on the button : Create Pin. I mean by that, that the text moves with the square rectangle. I was just curious how to use  dbCreateTextDisplay. I saw in one of your other post that the two first argument could be (should be?) similar.

     

    cv=geGetWindowCellView()
    ;; p=car(cv~>terminals~>pins)
    ;; term=car(cv~>terminals)
    foreach(term cv~>terminals
    p1=car(term~>pins) ;let supose term has only one pin
    p1~>net~>name
    f1=car(p1~>figs)   ;let supose p1 has only objType "rect" 
    unless(f1~>children ; when no attached text Display, let us create one (not a label, even if similar)
    disp=dbCreateTextDisplay( term term list(f1~>layerName  "label" ) t centerBox(f1~>bBox) "centerLeft" "R0" "roman" 0.5) 
    disp~>isNameVisible=nil ;makes the 'name=' invisible
    disp~>parent=p1~>fig    ;makes the text moving with the rect pin
    ; and now f1~>children is not nil => so a can re-run the script
    ))

     

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by ebecheto at 12 Dec 2012 07:49 AM. Topic has 3 replies.