General XMetaL Discussion
tonys December 11, 2008 at 6:55 am
Sharing files in XM DeveloperDecember 11, 2008 at 6:55 amParticipants 1Replies 2Last Activity 13 years, 6 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.XMetaLOldTimer December 11, 2008 at 7:12 am
Reply to: Sharing files in XM DeveloperDecember 11, 2008 at 7:12 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'.
AddamBouissaghouane January 5, 2009 at 10:17 am
Reply to: Sharing files in XM DeveloperJanuary 5, 2009 at 10:17 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”.
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.
- You must be logged in to reply to this topic.