• 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. How to browse a file by using skill

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 145
  • Views 20368
  • 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

How to browse a file by using skill

latha
latha over 15 years ago

 Hi,

I am trying to write a small skill script to search a file by using browse button in a form.

I am able to create a form but How i can place this browse option. 

Can you please let  me know the solution.

 

Thanks,

latha. 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    See this Cadence Online Support Solution. The relevant SKILL function is ddsFileBrowseCB().

    Regards,

    Andrew,


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 15 years ago

    Hi Latha,

    If you are using IC61 then you can use hiDisplayFileDialog() to open a file selector - this is mentioned in the solution that Andrew pointed out, but I thought I'd point it out here for all to see easily.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kbhow
    kbhow over 15 years ago

    Hi Latha,

    For me, i will use hiCreateFileSelectorField to create my form. This will create a type-in field similar to string field, except that it also has a Browse button at the right of the type-in box. The Browse button, when pressed, brings up a file dialog box that lets users select a file or directory. You can use the ?mode argument to specify what the user is allowed to select. When user makes selection and closes the file dialog, the selection is entered into the type-in box. Below are some simple example:

    hiCreateAppForm( ?name 'howForm

                               ?formTitle "Hello World"

                               ?fields list( hiCreateFileSelectorField(

                                                           ?name 'filePath

                                                           ?mode 'existingFile

                                                           ?prompt "File Name:" ))

                               ?unmapAfterCB t )

        hiDisplayForm(howForm)

     

    Hoping this simple coding may helps. :D

    Regards,How

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • latha
    latha over 15 years ago

    Iam using 5.1.0 version, is this skill functions work for this version.

    Thanks,

    latha 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 15 years ago

    Hi Latha,

    Unfortunately the answer is no, hiCreateFileSelectorField was introduced in the IC61x releases and it is not present in the IC5141 release. So you will need the function that Andrew suggested, ddsFileBrowseCB(). Here's the brief command syntax:

    ddsFileBrowseCB( r_form s_targetName [ t_filter ] [ s_mode ] [ t_caption ] ) 

     

    The solution that Andrew pointed out also seems to be the only solution that involves the use of this function, so use that and the documentation for reference.

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 14 years ago

     Hi Lawrence,

         I use the IC5141, and i also want to add a browser button in my form to select file, but i can't find any reference to the function you mentioned above (ddsFileBrowserCB()), could you tell me how to use this function or point out the reference manul, thanks

    regards,

    zfeng 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 14 years ago

    Hi Zfeng,

    There is a solution that gives an example of using ddsFileBrowseCB(), Solution 11457794

    Also note the name is "Browse" and not "Browser" as you mentioned above. If you enter the name of the function in CDSDoc (replaced by cdnshelp in IC61x releases), or in the Cadence Online Support Search box, you should be able to access the documentation for this function also.  There is a brief entry in the CDS Finder tool also (type "startFinder()" in the CIW, or "cdsFinder&" at the UNIX prompt, without the quotes in each case), again enter the function name, or a part of it, in the search box.

    I hope that this information helps you!

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • nosaj
    nosaj over 14 years ago

    Hi,

    I'm using hiCreateFileSelectorField and it works fine.

    Is there a quick way to add an "Edit" button next to the "..." button, so that when Edit is clicked it'd bring up a text editor to edit the file in question?

    Or must I use hiCreateButton to implement it?

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • nosaj
    nosaj over 14 years ago

     I figured out the code for Edit button.

     Now, i have another issue with creating a "Directory Browser" (not file) using ddsFileBrowseCB()

    since hiCreateFileSelectorField is not compatiable with 5.1.41, i decided to use ddsFileBrowseCB.

     Does ddsFileBrowseCB support 'directory or 'directoryONLY s_mode?

    thanks

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 14 years ago
    Hi,
    I can't reply you in detail at the moment, but I will check it out as soon as possible when I go back to my office!

    Regards,
    zhenfu FENG
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

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