How to set default file path for save

Hello all,
I'm currently blocked on the below issue and is hoping to gain your help and insights.
We have recently upgraded to InDesign CS6. Now when an INDD file created in an older version of INDD is opened in CS6, all the save dialogs would not default to the location of the original INDD file. Though if the same file is opened in the version of InDesign that created it, the save dialog goes to the proper location by default.
Debugged using our custom plugin as a gate way, and found out that after InDesign CS6 performed the document upgrade/convert, the database for the converted document loses file information. i.e.  IDataBase::GetSysFile() returns nil. I think we can figure out some way to get the original file path. For example, we can intercept "kAfterOpenDocSignalResponderService", and get the original file path of the opened file from IDocumentSignalData. Though I haven't yet able to figure out a safe way to set this file path to the document, so that the save dialogs would by default point at this path.
Utils<Facade::IWorkgroupFacade>()->InitDocumentAssetManagement(docRef, filePath) seems to do the right thing, but it seems to be quite intruding, and I'm afraid that it is overkilling and will cause bad side effect for the use case I'm looking for.
So I'm wondering if anyone has any suggestions to achieve this without implementing/overriding the file save dialog.
Thanks.
-Jeff

You should be able to avoid writing your own open-doc trap by using kDocBoss's IOpenedFileInfo to obtain the original file's path. It seems fairly reliable; the only time I've seen it come up empty is for an opened QuarkXPress document.
I'm afraid I don't know of a sanctioned way to change IDataBase::GetSysFile() without going through the database's SaveAs machinery. Overriding this behavior might only be possible by replacing the regular Save dialog with your own.
But if InitDocumentAssetManagement() is helping, maybe the workgroup/asset management approach is worth pursuing. Have you tried spying on that call in the debug app? You might be able to isolate and use one of the commands that it's invoking (IAMSPManager::BindAsset() / kSetAssetAttributesCmdBoss?) without all of the side-effects of the higher-level call.

Similar Messages

  • How to set default file path while downloading alv output

    Hi,
    Can anyone tell me that how to set default file path while downloading the ALV output to system using Local file button on tool bar.
    Please look below screenshots:
    Kindly help me resolve it.
    Thanks in advance.
    Regards,
    Ashutosh Katara

    This information initial value is (maybe) stored in Windows Register (register.exe) at Software\SAP\SAPGUI Front\SAP Frontend Server\Filetransfer -> PathDownload, you can read it thru class CL_GUI_FRONTEND_SERVICES method GET_UPLOAD_DOWNLOAD_PATH and update it thru method REGISTRY_SET_VALUE. (Else there may be some parameter ID to force data, but I'm no longer sure)
    Regards,
    Raymond

  • How to set default file type for Open dialog

    Dear my friends,
    I am using "At selection-screen ON VALUE-REQUEST FOR filepath" to display open dialog and i want to set default file type for open dialog = *.txt.
    Thank your times !

    Hello,
    U can make use of this code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SP_FILE.
      PERFORM SAVE_DIALOG CHANGING SP_FILE G_F_RC.
    FORM SAVE_DIALOG CHANGING PO_FILE PO_RC.
      DATA: L_VA_BOXTITLE     TYPE STRING,
            L_VA_DEFAULTFILE  TYPE STRING,
            L_VA_DEFAULTNAME  TYPE STRING,
            L_VA_DEFAULTPATH  TYPE STRING,
            L_VA_DEFAULTFULL  TYPE STRING,
            L_VA_FILTERTEXT   TYPE STRING,
            L_VA_CODE         TYPE I.
      CLEAR: PO_RC, G_F_CONF.
      L_VA_BOXTITLE   = TEXT-B01.
      L_VA_FILTERTEXT = TEXT-B02.
      IF PO_FILE IS INITIAL.
        CLEAR L_VA_DEFAULTFILE.
      ELSE.
        L_VA_DEFAULTFILE = PO_FILE.
      ENDIF.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
        EXPORTING
          WINDOW_TITLE            = L_VA_BOXTITLE
          DEFAULT_EXTENSION       = 'TXT'
          DEFAULT_FILE_NAME       = L_VA_DEFAULTFILE
          FILE_FILTER             = L_VA_FILTERTEXT
          INITIAL_DIRECTORY       = 'C:SAPWorkdir'
        CHANGING
          FILENAME                = L_VA_DEFAULTNAME
          PATH                    = L_VA_DEFAULTPATH
          FULLPATH                = L_VA_DEFAULTFULL
          USER_ACTION             = L_VA_CODE
        EXCEPTIONS
          CNTL_ERROR              = 1
          ERROR_NO_GUI            = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        PERFORM CHECK_ERRORTYPE(Z48M_MATDATA_UP) CHANGING SY-MSGTY.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        CLEAR PO_FILE.
        EXIT.
      ENDIF.
      IF L_VA_CODE NE 0.
        MESSAGE S818(3F) WITH TEXT-011.
        CLEAR: PO_FILE, PO_RC.
        EXIT.
      ELSE.
        WRITE L_VA_DEFAULTFULL TO PO_FILE.
        G_F_CONF = G_C_XFELD.
      ENDIF.
    ENDFORM.                    " save_dialog
    If useful reward.
    Vasanth

  • Set default directory/path for SaveAs Dialog using WPG_DOCLOAD

    Hi, im trying to set the default directory/path for the SaveAs Dialog called by wpg_docload.download_file.
    I'm not able to find where I can specify the default path.
    Is it something like "htp.p('Content-Disposition: attachment; path=:PX_OUTPUT_DIR" ?
    Thx for your help !
    Here's a part of my code
    owa_util.mime_header( NVL(mime,'application/octet'), FALSE );
    htp.p('Content-length: ' || length);
    htp.p('Content-Disposition: attachment; filename="'||substr(fileName,INSTR(fileName,'/')+1)|| '"');
    owa_util.http_header_close;
    wpg_docload.download_file( lobLoc );
    /*********************/

    I don't believe you're allowed to set the directory path in the Content-Disposition (or any other) header. More accurately, you can set path in the filename, but browsers don't pay any attention to that, they only look at only the terminal filename.
    <p>According to RFC 2183, browsers are supposed to ignore any path information sent with the filename. Even though it's dated 1997, I believe this RFC is still in effect.
    <p>This was done as a security precaution against malicious web apps that might try to download into a system directory or other dangerous place. Also, browsers (usually) allow users to specify their own default download directories. Further, even if you could specify the path, you'd have to do it for any and all filesystems (Linux, Mac HFS, Mac OSX, Windows, etc etc).

  • How to set default file permissions for applicatio...

    I have the nokia n86 and was wondering if there was any way of setting the file permissions of a program via the phone. To put it in context, i downloaded a program that edits photos but everytime i try to load a picture from my phone it asks me (for every single folder in my phone, not just the photo ones) if the program can open it. I can be there clicking yes all day as i there is a lot of folders and subfolders on the phone. I know sony ericssons had an option where you could select the programs permissions to always ask or never ask but i cant seem to find a similar option on the nokia.
    Does anyone have any ideas?

    Same issue here. Everything I put on the drive is set to Read-only for the group.

  • How to set default file type for screen capture?

    I want to change the default from .jpg2 to .jpg when doing a screen selection
    capture (cmd-shft-4). Where is the place to do this?
    Thank you,
    todd

    Todd,
    OnyX has 10 screen shot options available in Parameters>General>Screen Capture format:
    ;~)

  • :-)  How can we change the default file path for Bank file ( dmee ) ?

    Hi All,
    We encounter a problem.
    Electronic bank file ( created after a F110 run ) are created, in an automatic way to the DIR_TEMP directory. ( On the SAP server )
    How can we change the default file path for Bank files ( dmee ) ?
    We'd like to specify another path.
    Thx for your help.
    Erwan

    Hello,
    Make sure that you have created the directory in transaction code AL11 with the help of basis consultants.
    You can link your PC directory to the application server.
    You can maintain the path whether your file needs to get saved in OBPM4 against your DMEE structure example GB_BACS etc.
    If you do not maintain any path in OBPM4, then the file gets saved to temporary directory. If you give the directory path name in OBPM4, then the file gets saved to that directory with numbers 0001, 0002, 0003 etc till it reaches 9999 and reset from the beginning.
    If you give the path as well as file name as ABCD, then the file gets generated to that directory folder with ABCD0001, ABCD0002, ABCD0003 etc. till it reaches ABCD9999 and reset from the beginning.
    Hope this solves your problem.
    Regards,
    Ravi

  • Sun ONE Studio 4 aka Forte: How to set the output path for classes ?

    Help !
    Beginner's question:
    Sun ONE Studio 4 aka Forte:
    How to set the output path for classes ?
    As default, the class files are created in the same directory as the
    sources.
    In opposite, both JBuilder and Together support that there is a tree
    with the sources and another tree with the classes.
    The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
    a) Please point me to a ready-to-use ANT script for this purpose, if such is available
    b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
    Tia
    Sincerely
    Rolf

    You can set S1S's options to place newly created .class files in a specific location.
    Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
    Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
    The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
    When you set the Target, your change affects all classes that use this compiler.
    Very few options can't be set in S1S; the challenge is finding out where they're set!

  • How to set the file path dynamically based on sytem, username, and date

    Hi All,
    My requirement is upload the data into one  structure like xyz that is related to t.code MCSZ.
    file will be in  UNIx SERVER .
    PATH IS: /sapif
    file name is xy789 load .txt
    I have  to write code in one user-exit
    how can i set the file path for this.
    shall i put hard code file path?
    because i have to writecode in user-exit.
    plz tell me how to set the file path based ons syetem, username, date
    Thanks in advance
    Ram.A

    Concatenate the field SY-SYSID, SY-UNAME and SY-DATUM for the file path

  • How do I set the default file path for the Place command?

    I keep my graphics files for each document in a particular folder. Every time I open an existing InDesign document and place a new image I have to browse back to that location - even though all of the previous images in that document came from the same folder. InDesign does not remember the file path that was used previously in the document. This is very annoying.
    IS THERE A WAY TO SET THE DEFAULT FILE PATH, OR LOCATION, FOR IMAGE FILES?
    I have looked through the preferences, searched the forums and internet, but I have not found any reference to setting default paths. Is there a setting like the one in MS Word called "File Locations" on the Options toolbox?
    Thank you.

    Since you're working in ID on Windows, you can take advantage of a neat trick in Windows. Copy the file path out of the File Explorer address bar and paste it directly into the Place filename field. That will jump you directly to the desired volume. For example, let's say I want to place a graphic located at X:\PS Jobs\May PS\709672bp\Working Source Files\Links. I copy that entire path from the File Explorer address bar, go to InDesign, select File|Place, and press Control + V to paste that path into the filename field. I press the Open button and Shazam! I'm there instantly, without a bunch of navigation.
    You can do the same thing in the File|Save As and File|Export fields. Let's say you want export a PDF file from InDesign to the volume X:\PS Jobs\May PS\709672bp\Working PDF Files. First copy the desired file path from the File Explorer window. In InDesign, select File|Export, click anywhere in the filename field, and press the Home key to move the insertion point to the front of the filename. Press Control + V to paste that path in front of the filename, then add the backslash character (\). The filename will now look like this: X:\PS Jobs\May PS\709672bp\Working PDF Files\Filename.pdf. Press the Save button to bring up the Export Adobe PDF window. Select your desired PDF preset, press the Export button, and the PDF file will magically appear in the desired volume.
    This sounds really complicated, but it's not. In practice, it only takes a few seconds. I probably save an hour's worth of needless navigation every day with this technique.

  • How to set up the path for report in 10gAS?

    I have a report which can be run in one folder A but not in the other folder B, both folder are included in the forms_path in default.env of AS. How can I set up the path for the report in AS so that the report server knows to look for the report in the folder B?

    Hello,
    If you don't specify the "full path name" for your reports, the file will be searched in the directories listed in REPORTS_PATH or in the directory specified in the property sourceDir
    For more details :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/envvars/envvar_reports_path.htm
    and
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_conf.htm
    Regards

  • How to set default file location in Illustrator?

    I'm using Creative Suite CS5 in Windows Pro 64, and would like to set a default location for files in Illustrator and Photoshop when I execute the File > Open or File > Save commands.
    Yes, the program defaults to the location of the last file opened, but sometimes that file is gone, or I'm creating a new one from scratch, and the program looks for files in a distant place in my file structure.
    ** Is it possible to set a default file location for opening and saving in Illustrator CS5 (and in Photoshop CS5)?
    Thanks.

    Not that I know of. It simply reverts to the global "My Documents"/ "Documents" folder as provided by your operating system. these can of course be changed using variables and editing the Windows Registry/ Group Policies, but that affects all programs...
    Mylenium

  • How to set default file extension in the FileChooser?

    We are trying to use the FileChooser but for some reason, it doesn't have any file extensions in the drop down menu (like in windows). Does anyone know how to put this in?
    Also, how do we set the file name for the saving file, rather than typing the name in ourself?
    Also, how do we position the file chooser dialog in the middle of the screen? Right now, it's in the top left corner of the screen.
    Here's our piece of code, used for saving file.
    FileChooser fileChooser = new FileChooser();
            File file = fileChooser.showSaveDialog(stage);
            /*User might clicked on the cancel button*/
            if (file != null) {
                try {
                    Writer output = new BufferedWriter(new FileWriter(file));
                    output.write(text);
                    output.close();
                } catch (IOException ex) {
                    logger.error("save file error", ex);
            }Any help would be appreciated! Thanks!

    867511 wrote:
    We are trying to use the FileChooser but for some reason, it doesn't have any file extensions in the drop down menu (like in windows). Does anyone know how to put this in?Have you read the API? What's the nested class of FileChooser that's listed immediately after it in the classes list?
    Also, how do we set the file name for the saving file, rather than typing the name in ourself?I don't see any API for that. You could file a RFE on kenai.
    Also, how do we position the file chooser dialog in the middle of the screen? Right now, it's in the top left corner of the screen.I don't see any API for that either.
    db

  • How to set the File Path to run a javascript using Plugin Code?

    Hi All,
    Im new to Indesign Plugin Development.Can any one help me out with my problem.
    What i want to do is to run a javascript using Plugin Code.When i went through this forum i was able to find out that i should use the IscriptRunner Class to automate this.I could also figure out that the Member Function to use is "CanHandleFile" &"RunFile".
    The first parameter in CanHandleFile & RunFile Member Function is to specify the path of the JavaScript File i suppose!I could also find out that IDFile has to used to set the file path Information.
    But im clueless how to set the Javascript FilePath using IDFile.Can any one help me how to do this?Any Code Snippets Please?
    Waiting for reply.
    Thanks
    myRiaz

    Hi,  Andreas<br /><br />  Can you explain this in detail? I found it in your post before.<br /><br />  The content of elements are returned through the Characters callback function:<br /><br />From ISaxContentHandler.h:<br /><br />/**<br />        Receives character data<br /><br />The parser will call this method to report each chunk of<br />        character data. SAX parsers may return all contiguous<br />        character data in a single chunk, or they may split it into<br />        several chunks. But all characters in any single<br />        event must come from the same external entity so the<br />        Locator provides useful information.<br /><br />Note some parsers will report whitespace using the<br />        IgnorableWhitespace() method rather than this one (validating<br />        parsers must do so).<br /><br />@param Chars The characters from the XML document.<br />        */<br />virtual void Characters(const PMString& chars) = 0; <br /><br />  What i have done is implement my own SAXContentHandlerServiceBoss, and in my file XXXSAXContentHandler.cpp, I override the fonctions StartElement, EndElement, and Characters() like below: I add the PMString xmlData to collect the file content:<br /><br />class XXXSAXContentHandler : public CSAXContentHandler<br />{<br />void XXXSAXContentHandler::Characters(const WideString& chars)<br />{<br />xmlData.Append(chars);<br />}<br /><br />void XXXSAXContentHandler::StartElement(const WideString& uri, const WideString& localname, const WideString& qname, ISAXAttributes* attrs)<br />{<br />xmlData.Append("<"); xmlData.Append(localname); xmlData.Append(">");<br />}<br />void XXXSAXContentHandler::EndElement(const WideString& uri, const WideString& localname, const WideString& qname)<br />{<br />xmlData.Append("</"); xmlData.Append(localname); xmlData.Append(">");<br />}<br /><br />}<br /><br />and in my program, I use the code below to call the fonction I overrided, but I dont know how I can get the String xmlData I defined in the XXXSAXContentHandler.cpp<br /><br />InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());<br /><br />InterfacePtr<IK2ServiceProvider> xmlProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLParserService, kXMLParserServiceBoss));<br /><br />InterfacePtr<ISAXServices> saxServices(xmlProvider, UseDefaultIID());<br />InterfacePtr<ISAXContentHandler> saxHandler(::CreateObject2<ISAXContentHandler>(kXXXSAXContentHandlerServiceBoss));<br />saxHandler->Register(saxServices);<br />bool16 parseFailed = saxServices->ParseStream(readStream, saxHandler);<br /><br />Can you give me any help?<br /><br />Thanks and regards!

  • How to Set Default Printer Just for Safari

    I use 2 printers.
    One prints paper docs etc.  The other prints labels only.  When i want to print the labels I have to select that printer in the print dialogue in Safari every time.  Super annoying.
    IS there a way to set a gedault printer just for Safari?
    I tried using the localhost:641/admin method and all i get is Bad Request  (the localhost address i mention here is not the actual version as i cannot remember it now, but it was something like that)
    Using safari 6.0.2 and osx 10.8.2

    Please see these docs.
    How To Setup Default Printer for a User. [ID 153927.1]
    How to Set Up a Default Printer for a User Within Oracle Applications [ID 1018856.102]
    How To Define a Default Printer? [ID 1237254.1]
    How To Setup Default Printer For Applications [ID 184109.1]
    Thanks,
    Hussein

Maybe you are looking for

  • Final Cut Pro X and Canon LEGRIA HF M41

    Hi, I need to change my video camera set-up but can't afford to make the jump to pro cameras yet so I am looking at the Canon LEGRIA HF M41's but I can find any info on how well they work with FCP-X. Is the importing seamless or do you have to transc

  • How to rollup cube data in Process chain?

    I have loaded data into a cube, and when i look at the technical status it is green but there is nothing in the "request for reporting available"box. I went to Rollup Tab and manually execute the request. It worked. But is there anyway that I can add

  • Problem of OCI calls in DLL

    Hi, I am developing a DLL in which i am using OCI calls to interact with Oracle. The Logon oci call "olog" itself fails when it is called from DLL. It is working fine in EXE. Whether OCI calls can be used in DLL? If so, let me know how to use it. If

  • Controlling Embedded Captivate SWFs

    Hi: I have a SWF (SWF A) that I'm loading into a movieclip (Movieclip C)which is part of another SWF (SWF B). Basically, SWF B functions as a player, with play and pause controls. These controls control Movieclip C where the external SWF A is loaded

  • How can I start windows 8 without useing my password

    how can I start windows 8 without useing my password