Home › Forums › General XMetaL Discussion › Sharing files in XM Developer › Reply To: Sharing files in XM Developer
Reply to: Sharing files in XM Developer
January 5, 2009 at 10:17 amThis 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