General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Sharing files in XM Developer

  • tonys

    Sharing files in XM Developer

    Participants 1
    Replies 2
    Last Activity 14 years, 3 months ago

    As far as I can tell, it isn't possible to add files to a developer project as links. This means that I can't put a macro in a file and use it several times; I need to have multiple copies (and hence maintain each one separately).

    Does anyone have a good method of sharing files between projects? I could use an external tool (such as ant) to copy files to the right place, but that seems like a lot of complication.

    (If I'm missing something really obvious, please be gentle …)

    Tony S.

    Reply

    XMetaLOldTimer

    Reply to: Sharing files in XM Developer

    Unfortunately, XM Developer is still constrained to having all the project files under a single folder.  You could try using Windows NTFS junction points…they are like a unix 'link'.

    [url=http://support.microsoft.com/kb/205524]http://support.microsoft.com/kb/205524[/url]

    Addam

    Reply

    Bouissaghouane

    Reply to: Sharing files in XM Developer

    This is generic way of creating some form of (primitive) sharing in X-Metal developer

    You can use a text editor to open the .xdp file in your project directory. Add a path to the filenames under the header “files”.

    For example:

    I have added all the routines I use to the event macro file “On_Macro_File_Load” (see the dev. docs about  this event!). This file is shared by alle the macros and events in my different projects. The file is in a shared directory “W:XM-Shared”. I usually edit the .xdp file and change “On_Macro_File_Load.js” in “W:\XM-Shared\On_Macro_File_Load.js” (escape the backslash). All my projects share the same On_Macro_File_Load even if i dont use all the routines. I just make sure that when a routine is changed all the projects are rebuild.

    I also create a macro called “Project_On_Macro_File_Load” in my project directory. This file contains the project-specific routines. At the end of the shared file “On_Macro_File_Load” I use the ActiveDocument.Host.Run(“Project_On_Macro_File_Load”) to make sure that the project specific routines are loaded.

    Mohamed

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support