• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Passing values through a Skill User Form

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 15140
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Passing values through a Skill User Form

NKU10k
NKU10k over 12 years ago

 Hi,

I am trying to create a form accesible with a menu in Virtuoso Layout editor to create a complex shape. Managed to add the menu, couple of menu items and create a form using material in this forum and web but struggling to pass the values input through the form to a procedure. I am trying to draw a donutas a start.

My code is copied below and appriciate anyone can help figuring out the problem.

The error  message is

*Error* dbCreateDonut argument #4 should be a number (type template = "dglnn") - nil

procedure(CreateAddDoForm()
     let((InnerRadius OuterRadius Centre Layer)
        InnerRadius=hiCreateIntField(
                ?name 'InnerRadius
                ?prompt "Inner Radius"
                )
    OuterRadius=hiCreateIntField(
                ?name 'OuterRadius
                ?prompt "Outer Radius"
                )
    Centre=hiCreateIntField(
                ?name 'Centre
                ?prompt "Centre"
                )
        Layer=hiCreateIntField(
                ?name 'Layer
                ?prompt "Layer"
                )
               
        hiCreateAppForm(
            ?name 'AddDonutForm
            ?formTitle "Input Source Parameters"
            ?buttonLayout 'OKCancelApply
            ?callback "DrawDonut()"
            ?fields
                list(
                    list(InnerRadius 0:0 200:30 100)
                    list(OuterRadius 0:35 200:30 100)
                    list(Centre 0:70 200:30 100)
                    list(Layer 0:105 200:30 100)
                    )
                      )
         );let
      );procedure

procedure(FunctionAddDonut()
     unless(boundp('AddDonutForm)
        CreateAddDoForm()
           )
  
     hiDisplayForm(AddDonutForm)
         )

procedure(DrawDonut()
      let( (Orad Irad)
        Orad=AddDonutForm->OuterRadius->Value
        Irad=AddDonutForm->InnerRadius->Value
        cvID=geGetWindowCellView()
        dbCreateDonut(cvID "DIFF"  0:0 Orad Irad)
       
       )

      )

 

  • Cancel
Parents
  • NKU10k
    NKU10k over 12 years ago

     Superb Andrew! Many thanks.

    Can I ask one more question please....

    I am trying to chop a donut into peices with leChopShape so that I can remove pieces of the donut. In the following code I wrote, it works for couple of i s and doesn't do it all the way around the donut. 

    I checked whether the logic is working with the commented out dbCreateLine statement which seem to draw the line as I want it.

    I was wondering whether the db ID of the shape is changed when it is chopped and tried get the handle with  "NewShapes" but didn't quite work.

    Appriciate of you can help.

    Try the ConstructCog(100 2 1 1 2) to invoke it.

    Many thanks again.

     

    procedure( ConstructCog(cc_mainR cc_SourceNLength cc_NPolyOvelap cc_NWidth cc_PWidth)

         MainCirc= 2*3.14*cc_mainR
        NumOfSegs=round(MainCirc/(cc_NWidth+cc_PWidth))
        SegWidth=MainCirc/NumOfSegs
        SegNWidth=SegWidth*cc_NWidth/(cc_NWidth+cc_PWidth)
       
        cc_InnerR=cc_mainR-cc_NPolyOvelap
        cc_OuterR=cc_mainR+cc_SourceNLength
           
        cvID=geGetWindowCellView()
        donutID=dbCreateDonut(cvID "NPLUS"  0:0  cc_OuterR cc_InnerR)
        ;hiZoomAbsoluteScale(cvID 1) ; want to zoom to fit, doesn't work

        NSegAngle=SegNWidth/cc_mainR
        PitchAngle=SegWidth/cc_mainR
        cc_TempRadius=cc_mainR+cc_SourceNLength+1

    for(i 1 NumOfSegs

        i_FirstX=cc_TempRadius*cos((i-1)*PitchAngle)
        i_FirstY=cc_TempRadius*sin((i-1)*PitchAngle)
        i_secondX=cc_TempRadius*cos((i-1)*PitchAngle+NSegAngle)
        i_secondY=cc_TempRadius*sin((i-1)*PitchAngle+NSegAngle)
       
        ;dbCreateLine(cvID "PPLUS" list(0:0 i_FirstX:i_FirstY i_secondX:i_secondY 0:0))
       

        ;leChopShape( donutID list(0:0 i_FirstX:i_FirstY i_secondX:i_secondY 0:0) nil nil 300 )

        NewShapes=leChopShape( donutID list(0:0 i_FirstX:i_FirstY i_secondX:i_secondY 0:0)
        nil nil 300 )
        donutID=cadr(NewShapes)
       
        );for
          ) ;procedure
     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • NKU10k
    NKU10k over 12 years ago

     Superb Andrew! Many thanks.

    Can I ask one more question please....

    I am trying to chop a donut into peices with leChopShape so that I can remove pieces of the donut. In the following code I wrote, it works for couple of i s and doesn't do it all the way around the donut. 

    I checked whether the logic is working with the commented out dbCreateLine statement which seem to draw the line as I want it.

    I was wondering whether the db ID of the shape is changed when it is chopped and tried get the handle with  "NewShapes" but didn't quite work.

    Appriciate of you can help.

    Try the ConstructCog(100 2 1 1 2) to invoke it.

    Many thanks again.

     

    procedure( ConstructCog(cc_mainR cc_SourceNLength cc_NPolyOvelap cc_NWidth cc_PWidth)

         MainCirc= 2*3.14*cc_mainR
        NumOfSegs=round(MainCirc/(cc_NWidth+cc_PWidth))
        SegWidth=MainCirc/NumOfSegs
        SegNWidth=SegWidth*cc_NWidth/(cc_NWidth+cc_PWidth)
       
        cc_InnerR=cc_mainR-cc_NPolyOvelap
        cc_OuterR=cc_mainR+cc_SourceNLength
           
        cvID=geGetWindowCellView()
        donutID=dbCreateDonut(cvID "NPLUS"  0:0  cc_OuterR cc_InnerR)
        ;hiZoomAbsoluteScale(cvID 1) ; want to zoom to fit, doesn't work

        NSegAngle=SegNWidth/cc_mainR
        PitchAngle=SegWidth/cc_mainR
        cc_TempRadius=cc_mainR+cc_SourceNLength+1

    for(i 1 NumOfSegs

        i_FirstX=cc_TempRadius*cos((i-1)*PitchAngle)
        i_FirstY=cc_TempRadius*sin((i-1)*PitchAngle)
        i_secondX=cc_TempRadius*cos((i-1)*PitchAngle+NSegAngle)
        i_secondY=cc_TempRadius*sin((i-1)*PitchAngle+NSegAngle)
       
        ;dbCreateLine(cvID "PPLUS" list(0:0 i_FirstX:i_FirstY i_secondX:i_secondY 0:0))
       

        ;leChopShape( donutID list(0:0 i_FirstX:i_FirstY i_secondX:i_secondY 0:0) nil nil 300 )

        NewShapes=leChopShape( donutID list(0:0 i_FirstX:i_FirstY i_secondX:i_secondY 0:0)
        nil nil 300 )
        donutID=cadr(NewShapes)
       
        );for
          ) ;procedure
     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information