how to get the values of an instance through skill

Discussion in 'Cadence' started by noreply, Jun 17, 2009.

  1. noreply

    noreply Guest

    Hi ,
    I want to get the values of an instance through skill...say for eg., i
    want to get the number of fingers or the length of each finger in an
    instance through skill. how to proceed?

    Please do comment on this...
    regards,
    Lokesh rajendran.
     
    noreply, Jun 17, 2009
    #1
  2. noreply

    KB.How Guest

    Hi Lokesh,

    You may use the function cdfGetIstCDF to obtain the cdf info of an
    instances.


    Regards,
    How
     
    KB.How, Jun 17, 2009
    #2
  3. noreply

    noreply Guest

    Hi KB.How,
    I tried the following code as per your suggestion:
    myId=caar(geGetObjectSelectedSet());to get the object id
    obj1=cdfGetInstCDF(myId)

    after obtaining the properties of the instance in "obj1" ,i tried the
    following:
    obj1~>?parameters
    and
    obj1~>instParameters
    but i dont know how to obtain the width/length info of the instance
    from it..
    could you please help..
    Regards,
    Lokesh rajendran.
     
    noreply, Jun 17, 2009
    #3
  4. noreply

    camelot Guest


    cdfgData = cdfGetInstCDF(instance)
    get_p = cdfFindParamByName(cdfgData "width")
    width_v = get_p->value

    Camelot
     
    camelot, Jun 17, 2009
    #4
  5. noreply

    I-F AB Guest

    Hi,

    I think what was meant was:
    obj1_cdf=cdfGetInstCDF(myId)
    then check:
    ParNames = obj1_cdf~>parameters~>name
    ParValues = obj1_cdf~>parameters~>value

    to see all corresponding names & their values.
    But if you need a code to derive it:
    LengthParam = car( exists( X obj1_cdf~>parameters
    X~>name=="length" ) )
    Length = LengthParam~>value

    Similarly with width.

    Best Regards,
    I-FAB
     
    I-F AB, Jun 17, 2009
    #5
  6. noreply

    KB.How Guest

    Hi Lokesh,


    Try this ( similar with camerlot answer )

    cdfId = cdfGetInstCDF(inst)
    fingerLength = cdfFindParamByName(cdfId "fingerLength")~>value
    fingerWidth = cdfFindParamByName(cdfId "fingerWidth")~>value


    Let us know if you encounter any issue.

    Regards,
    How
     
    KB.How, Jun 18, 2009
    #6
  7. noreply

    noreply Guest

    Hi camelot,
    the following was the code that i wrote based on your inputs....
    Just giving the code in a form that worked for me....
    And thanks a lot for your help.......

    ;the code gives the value of the parameters like width,length of the
    instance etc.,
    myId=caar(geGetObjectSelectedSet());to get the object id
    cdfId = cdfGetInstCDF(myId)
    getP = cdfFindParamByName(cdfgData "w")
    ;its highly recommended that you test the following
    "cdfId~>parameters~>name" to know the exact string that has to entered
    for the above command like "width" or "W"
    myWidth = getP->value

    Regards,
    Lokesh rajendran
     
    noreply, Jun 18, 2009
    #7
  8. noreply

    noreply Guest

    Hi I-fab and k-how,
    The code that you gave is also wonderful and its working...
    And thanks for posting the code. I'm just amazed by the way a single
    goal is accomplished by different styles of writing code......
    Regards,
    Lokesh rajendran.
     
    noreply, Jun 18, 2009
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.