Skip to main content
Participant
December 9, 2021
Answered

Framescript question: setting the FM workspace

  • December 9, 2021
  • 2 replies
  • 284 views

Hi there!

 

I am on FM 2020 structured XML, with FrameScript 7. In order to address an apparent bug, we need to explicitly set the FM workspace. (This is because, if the Structure View is open, running a script on our books always launches a popup asking to save structure.fm. I don't want to save structure.fm and am not even sure if that is a file that exists.  But this hangs the run.  So I want to set the workspace right at the start to one that does not have the Structure View open.).

 

According to the FrameScript doc, the command is:

Set ret = eUtl.SetWorkSpace{fm_workspace};

 

where ret is the return code, and fm_workspace is the name of the workspace.

 

We have tried:

Set ret = eUtl.SetWorkSpace{Struct_noStructureView};
Set wrkName = eUtl.GetWorkSpace{};

or just

Set FMWorkspace = eUtl.SetWorkSpace{Struct_noStructureView};

 

But we always get the error: "FrameScript: Run Error (Invalid Property) on command (SET) at Line (17) -- which always points to the eUtl.SetWorkSpace command. I think the syntax is correct according to the docs, and I don't know what the invalid property is. I thought it might be the custom workspace, so we also tried the built-in workspace "Authoring" so I don't think it's that.

 

Any ideas?

 

Thanks so much,

Shelley

    This topic has been closed for replies.
    Correct answer frameexpert

    Hi Shelley, I remember you. I am not sure about the eUtl.SetWorkSpace command because I haven't used it. A couple of suggestions: it may be better to see why the script tries to save Structure.fm and fix the code. If the problem is that the Structure View is open, then you can use this in your script to close it:

    Execute Fc KbdCloseStrwin;

    2 replies

    frameexpert
    Community Expert
    frameexpertCommunity ExpertCorrect answer
    Community Expert
    December 9, 2021

    Hi Shelley, I remember you. I am not sure about the eUtl.SetWorkSpace command because I haven't used it. A couple of suggestions: it may be better to see why the script tries to save Structure.fm and fix the code. If the problem is that the Structure View is open, then you can use this in your script to close it:

    Execute Fc KbdCloseStrwin;
    Participant
    December 10, 2021

    Ha, good idea to actually try to deal with the cause.  As a shortcut, I took your advice and just closed the view using the command above.  Some day (hopefully), I'll comment out that fix and walk through the code to try to find the offending line.

    Anyways, it's working now!  Thanks so much.

     

    Shelley

    Participant
    December 9, 2021

    BTW, I'm not actually new here.  I have a new login because Perforce Software purchased Rogue Wave Software. And FrameExpert -- I believe you led us through FrameScript classes circa 2016. 🙂