• 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. Allegro X PCB Editor
  3. Form with

Stats

  • Replies 11
  • Subscribers 160
  • Views 16469
  • Members are here 0
More Content

Form with

LP2R4T
LP2R4T over 14 years ago

Hello,

How can I create a form with a fillin field that accepts multiple decimal values similar to the Grid spacing Setup menu in APD.

Spacing x: 25.00 25.00 25.00 

now the formfield looks like this:

FORMFILE FIELD current_grid_x_grids
FORMFILE FLOC 30 4
FORMFILE STRFILLIN 30 256
FORMFILE ENDFIELD

The problem is that it accepts all string values.. 

Thanks in advance

 

  • Sign in to reply
  • Cancel
  • aCraig
    aCraig over 14 years ago

    I don't believe you can *limit* STRFILLIN to only numerical values. What you can do is verify that only numerical values were entered in to the field. If it's not you can make the field active and send a message to the form to tell the user to use only numerical values. You could also use a confirmer with an example.

     Craig

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 14 years ago

    In your form callback routine you would need to have something like this:

    unless(rexMatchp("^[-]*[0-9]*[.]*[0-9]+$", formID ->curValue)
     axlFormRestoreField(form, formID ->curField), axlFormMsg(form, "warningmsg", "Invalid number")
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • LP2R4T
    LP2R4T over 14 years ago

    Thanks Dave,

     I'm not fimilar with the following controls "^[-]*[0-9]*[.]*[0-9]+$" but if I want the form field STRFILLIN  to accept more then one set of numerical values in the same field like this 24.77 33.78 455.689 555.99 what would be the controls

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 14 years ago

    Try something like:

    unless(forall(nStr, parseString(formID ->curValue), rexMatchp("^[-]*[0-9]*[.]*[0-9]+$", nStr))
     axlFormRestoreField(form, formID ->curField), axlFormMsg(form, "warningmsg", "Invalid number list")
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • LP2R4T
    LP2R4T over 14 years ago

     To be more specific I want to the field to accept at least 4 numerical values (7 with 2 decimals) 1111111.11 2222222.22 3333333.33 4444444.44 

    Thanks Dave,

     I'm not fimilar with the following controls "^[-]*[0-9]*[.]*[0-9]+$" but if I want the form field STRFILLIN  to accept more then one set of numerical values in the same field like this 24.77 33.78 455.689 555.99 what would be the controls

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
Cadence Guidelines

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