Home > Community > Forums > Custom IC SKILL > Help regarding pop-push of a LIST

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: *

 Help regarding pop-push of a LIST 

Last post Wed, Mar 13 2013 10:14 PM by Neeraj Vardhan. 37 replies.
Started by Neeraj Vardhan 04 Mar 2013 08:09 PM. Topic has 37 replies and 2995 views
Page 2 of 3 (38 items) < Previous 1 2 3 Next >
Sort Posts:
  • Tue, Mar 5 2013 10:11 PM

    Re: Help regarding pop-push of a LIST Reply

    If you've got the shape in a variable, it would be shape~>width .

    For example, if you have the path selected (and only one thing selected), it would be car(geGetSelSet())~>width

    Kind Regards,

    Andrew 

    • Post Points: 20
  • Tue, Mar 5 2013 10:22 PM

    Re: Help regarding pop-push of a LIST Reply
    Thanks Andrew, It worked, Is there any other option to get the default width of metal layers. Because when i used this command "dbCreatePath" and width of the path as you mentioned. It didnt flag error for min width error for top layers, it just created the path. So was looking for any function which could get me the default width. ex if i could get the width from the path form which pops up after i use p+F3 to change the default width. Regards Neeraj
    • Post Points: 20
  • Wed, Mar 6 2013 12:36 AM

    Re: Help regarding pop-push of a LIST Reply

    techGetSpacingRule(techGetTechFile(geGetEditCellView()) "minWidth" "Metal1")

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, Mar 6 2013 1:13 AM

    Re: Help regarding pop-push of a LIST Reply
    Thanks Andrew I am stuck with another problem, the function hiGetPoint(CV) provides us the dynamic point coordinates. Which is not suitable for forming paths using those points. Is there a way i could get the points which provide me the points which are suitable for drawing a path. I dont know how to paste the screen shots, as it would be easy to understand. Regards Neeraj
    • Post Points: 20
  • Wed, Mar 6 2013 1:28 AM

    Re: Help regarding pop-push of a LIST Reply

    Neeraj,

    You should use the enterPath() function.

    Andrew.

    • Post Points: 20
  • Wed, Mar 6 2013 1:53 AM

    Re: Help regarding pop-push of a LIST Reply
    Hi Andrew, sorry to trouble you. Can you please give me an example of entryPath() function. I have gone through the manual but, i am unable to understand it completely how its working.
    • Post Points: 5
  • Wed, Mar 6 2013 1:58 AM

    Re: Help regarding pop-push of a LIST Reply
    Sorry to trouble you again Andrew. I did see the example given in the manual. Now it makes sense to me ........Thanks A lot Regards Neeraj
    • Post Points: 5
  • Wed, Mar 6 2013 6:28 AM

    Re: Help regarding pop-push of a LIST Reply
    Hi Andrew I wanted to enter the width of route by creating a form. I tried it but failed to extract the width to the enterPath function. Can you let me know where i am doing wrong. The code is pasted below for reference procedure(nvGetWidthForm() metal_width=hiCreateFloatField(?name 'Metal_Width ?value width ?prompt "Metal Width" ?callback "width=hiGetCurrentForm()->metal_width->value" ) get_wid=hiCreateAppForm( ?name 'width ?formTitle "METAL WIDTH" ?buttonLayout 'OKCancel ?fields list( list(metal_width 0:20 300:10 80) ) ) ; hiCreateAppForm ) ; let ) ; procedure_nvGetWidthForm() procedure(nvCreatePath() get_wid=0 width=0.1 hiDisplayForm(nvGetWidthForm()) enterPath( ?prompts list( "Point at the first point of the path:" "Point at the next point of the path:" ) ?addPointProc "nvGetMyLayer()" ?points p_list ?form get_wid ?pathWidth width ?doneProc "nvGetMyDirection" ?pathStyle "Truncate" ); enter_Path ); procedure_nvCreatePath hiSetBindKey("Layout" "/" "nvCreatePath()") hiSetBindKey("Layout" "1" "leSetEntryLayer(\"M1\")") hiSetBindKey("Layout" "2" "leSetEntryLayer(\"M2\")") hiSetBindKey("Layout" "3" "leSetEntryLayer(\"M3\")") Regards Neeraj
    • Post Points: 20
  • Wed, Mar 6 2013 6:30 AM

    Re: Help regarding pop-push of a LIST Reply

    Can you please re-post your code (maybe you're using Chrome, which causes issues with the formatting in this forum; if so, please use a different browser). The formatting is completely lost, and I don't really have time to mess around with it to make it readable.

    Thanks,

    Andrew.

    • Post Points: 20
  • Wed, Mar 6 2013 6:47 AM

    Re: Help regarding pop-push of a LIST Reply

    procedure(nvGetWidthForm()

    metal_width=hiCreateFloatField(?name 'Metal_Width
              ?value width
              ?prompt "Metal Width"
               ?callback "width=hiGetCurrentForm()->metal_width->value"
              )
    get_wid=hiCreateAppForm(
      ?name 'width
      ?formTitle "METAL WIDTH"
      ?buttonLayout 'OKCancel
      ?fields list(
      list(metal_width 0:20 300:10 80)
      )
    ) ; hiCreateAppForm
    ) ; let
    ) ; procedure_nvGetWidthForm()

    procedure(nvCreatePath()
    get_wid=0
    width=0.1
    hiDisplayForm(nvGetWidthForm())
    enterPath(
        ?prompts
          list( "Point at the first point of the path:"
                "Point at the next point of the path:"
          )
        ?addPointProc "nvGetMyLayer()"
        ?points p_list
        ?form get_wid
        ?pathWidth width
        ?doneProc "nvGetMyDirection"
        ?pathStyle "Truncate"
      ); enter_Path

    ); procedure_nvCreatePath

    hiSetBindKey("Layout" "<Key>/" "nvCreatePath()")
    hiSetBindKey("Layout" "<Key>1" "leSetEntryLayer(\"M1\")")
    hiSetBindKey("Layout" "<Key>2" "leSetEntryLayer(\"M2\")")
    hiSetBindKey("Layout" "<Key>3" "leSetEntryLayer(\"M3\")") 

    • Post Points: 20
  • Wed, Mar 6 2013 7:58 AM

    Re: Help regarding pop-push of a LIST Reply

    Try this - I modified your code. You really need to use an options form for this - I've extended to cope with updating the rubber-band width of the path if you change the width during digitization. Hit return to finish the path (or double-click).

    I added comments to give you some idea as to what is going on.

    Andrew.

    ;------------------------------------------------------------------------
    ; Callback for if the path width is changed - reinitializes the
    ; enterPath so it rubberbands with the correct width
    ;------------------------------------------------------------------------
    procedure(nvCreatePathChangeWidth()
    changeEnterFun(
        'enterPath
        ?prompts
          list( "Point at the first point of the path:"
                "Point at the next point of the path:"
          )
        ?addPointProc "nvCreatePathCurrentPointsProc"
        ?delPointProc "nvCreatePathCurrentPointsProc"
        ?points nvCreatePathCurrentPoints
        ?form nvGetWidthForm
        ?pathWidth nvGetWidthForm->Metal_Width->value
        ?doneProc "nvCreatePathDoneProc"
        ?pathStyle "Truncate"
      ); enter_Path
    )

    procedure(nvCreateGetWidthForm()

    metal_width=hiCreateFloatField(?name 'Metal_Width
              ?value 0.1
              ?prompt "Metal Width"
               ; this is to update the rubber banding...
               ?callback "nvCreatePathChangeWidth()"
              )
    hiCreateAppForm(
      ?name 'nvGetWidthForm
      ?formTitle "METAL WIDTH"
      ; note that it must be an options form, and there are
      ; different allowed buttons on this form
      ?formType 'options
      ?buttonLayout 'HideCancel
      ?fields list(
      list(metal_width 0:20 300:10 80)
      )
    ) ; hiCreateAppForm
    ;) ; let
    ) ; procedure_nvGetWidthForm()

    ;------------------------------------------------------------------------
    ; When finished, draw the path
    ;------------------------------------------------------------------------
    procedure(nvCreatePathDoneProc(win done points)
      let((cv)
        when(done
            cv=geGetEditCellView(win)
            dbCreatePath(cv leGetEntryLayer() points nvGetWidthForm->Metal_Width->value)
        )
      )
    )

    ;------------------------------------------------------------------------
    ; This is used to update the global variable recording the points.
    ; Only used so that when you change the width on the options form,
    ; it will reinitialize the new enterPath with the points collected
    ; so far.
    ;------------------------------------------------------------------------
    procedure(nvCreatePathCurrentPointsProc(win points)
      nvCreatePathCurrentPoints=points
    )

    procedure(nvCreatePath()
    unless(boundp('nvGetWidthForm)
      nvCreateGetWidthForm()
    )
    nvCreatePathCurrentPoints=nil
    enterPath(
        ?prompts
          list( "Point at the first point of the path:"
                "Point at the next point of the path:"
          )
        ?addPointProc "nvCreatePathCurrentPointsProc"
        ?delPointProc "nvCreatePathCurrentPointsProc"
        ?form nvGetWidthForm
        ?pathWidth nvGetWidthForm->Metal_Width->value
        ?doneProc "nvCreatePathDoneProc"
        ?pathStyle "Truncate"
        ; comment out if you don't want the form to appear initially
        ?alwaysMap t
      ); enter_Path

    ); procedure_nvCreatePath

    hiSetBindKey("Layout" "<Key>/" "nvCreatePath()")
    hiSetBindKey("Layout" "<Key>1" "leSetEntryLayer(\"M1\")")
    hiSetBindKey("Layout" "<Key>2" "leSetEntryLayer(\"M2\")")
    hiSetBindKey("Layout" "<Key>3" "leSetEntryLayer(\"M3\")")

    • Post Points: 20
  • Thu, Mar 7 2013 10:50 PM

    Re: Help regarding pop-push of a LIST Reply
    Hi Andrew is there any way that the form doesn't pop-up at the starting. Instead it should take the previous value and if at all i press F3 the form should pop-up. In the above code i have to cancel it and then press F3 if i want to change the width. Regards Neeraj
    • Post Points: 20
  • Thu, Mar 7 2013 10:58 PM

    Re: Help regarding pop-push of a LIST Reply

    If you look at the code, I already added a comment explaining how to do this. Look 8 lines from the bottom of the code and there is a comment above the ?alwaysMap line. So comment out the ?alwaysMap line (or remove it) if you don't want the form to appear initially. 

    It should already remember the width from the previous invocation.

    Kindest Regards,

    Andrew 

    • Post Points: 20
  • Fri, Mar 8 2013 2:11 AM

    Re: Help regarding pop-push of a LIST Reply

    Hi Andrew,

    Thanks A Lot, the script is working fine. There is only one problem when i use the enterPath() function. I cant change the layer, if i am drawing a straight line. Because it will save only the co-ordinates of the change in direction. i was thinking to add click to retrive the point if i am using it as a straight path also. Is there any other option to do this

    Regards

    Neeraj 

     

    • Post Points: 20
  • Mon, Mar 11 2013 7:27 AM

    Re: Help regarding pop-push of a LIST Reply

    Neeraj,

    It's not entirely clear to me what you're trying to do. If you want to do something where you effectively draw the path so far, then change layer, the carry on digitizing starting from the last point - you could do that easily enough by either having a bindkey which uses the global list of points that have been collected so far to create the path, and then change the enter function to pre-seed the points with the last entry in the global variable nvCreatePathCurrentPoints. Or you could make it do a finishEnterFun() and then call your orginal nvCreatePath() again - but modify it so that it takes an optional list of points. Something like:

    procedure(nvCreatePath(@key points)
    unless(boundp('nvGetWidthForm)
      nvCreateGetWidthForm()
    )
    nvCreatePathCurrentPoints=nil
    enterPath(
        ?prompts
          list( "Point at the first point of the path:"
                "Point at the next point of the path:"
          )
        ?addPointProc "nvCreatePathCurrentPointsProc"
        ?delPointProc "nvCreatePathCurrentPointsProc"
        ?form nvGetWidthForm
        ?points points
        ?pathWidth nvGetWidthForm->Metal_Width->value
        ?doneProc "nvCreatePathDoneProc"
        ?pathStyle "Truncate"
        ; comment out if you don't want the form to appear initially
        ?alwaysMap t
      ); enter_Path

    ); procedure_nvCreatePath

    hiSetBindKey("Layout" "<Key>F8" "finishEnterFun() leSetEntryLayer(\"Metal2\") nvCreatePath(?points last(nvCreatePathCurrentPoints))")

    But maybe I've misunderstood you?

    Andrew.

     

    • Post Points: 20
Page 2 of 3 (38 items) < Previous 1 2 3 Next >
Sort Posts:
Started by Neeraj Vardhan at 04 Mar 2013 08:09 PM. Topic has 37 replies.