Saving ADE state without user interaction (2)

Discussion in 'Cadence' started by Julian, Jun 20, 2008.

  1. Julian

    Julian Guest

    Hello!

    I am trying to save the state of the currently opened ADE-window to a
    given directory.

    My solution looks like this:

    //get session object
    session=sevSession(hiGetCurrentWindow())
    //open the "Save state" dialog
    sevSaveState(session)
    //set values
    sevSaveForm1->optionCellView->value = "Directory"
    sevSaveForm1->stateSaveDir->value = "~/myArtistStateDir"
    sevSaveForm1->name->value = "mystate"
    (_sevSelectComponentField ''sevSession1 ''save ''all)
    //close form
    hiFormDone(sevSaveForm1)

    Unfortunately, this is not working anymore after you have closed and
    re-opened the ADE window, because now the "save state"-form name has
    changed to "sevSaveForm2". So how can I access this form in general
    way.
    Or is there an easier way of doing this?

    Thanks in advance

    Julian
     
    Julian, Jun 20, 2008
    #1
  2. Julian wrote, on 06/20/08 09:12:
    Unfortunately there's no public API to save the state without a form - at least
    not until IC612, where you have asiSaveState() (this doesn't exist in IC5141).

    Rather than using a defined variable for the sevSaveForm1, you could use
    hiGetCurrentForm() - which will return the current form.

    Bit messy, unless you're using IC61.

    Regards,

    Andrew.
     
    Andrew Beckett, Jun 20, 2008
    #2
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.