Pages: 1
Print
Author Topic: Sharing files in XM Developer  (Read 2439 times)
tonys
Member

Posts: 13


« on: December 11, 2008, 12:55:08 AM »

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.
Logged
XMetaLOldTimer
Global Moderator
Member

Posts: 19


« Reply #1 on: December 11, 2008, 01:12:26 AM »


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'.

http://support.microsoft.com/kb/205524

Addam
Logged

Addam Smith, XMetaL Project Lead & Architect
JustSystems Canada Inc.
Bouissaghouane
Member

Posts: 5


« Reply #2 on: January 05, 2009, 04:17:01 AM »

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
Logged
Pages: 1
Print
Jump to: