Automated Variable Import

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
Dave Dunn
Posts: 3
Joined: Fri Sep 28, 2012 6:45 pm

Automated Variable Import

Unread post by Dave Dunn »

I am generating variables using VBA script in Excel and exporting them as text files to be imported into H%M. I was wondering if there is any way to import the variables directly into H&M without having to use the Import feature.
Tobias Escher
Posts: 202
Joined: Mon Dec 28, 2015 7:32 pm

Re: Automated Variable Import

Unread post by Tobias Escher »

I always edit the project xml file directly. I need to change variables daily and unfortunately H+M does not update Variables when they change in the repository, so this is the only way :(
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Automated Variable Import

Unread post by Tim Green »

Hi Dave,

As Tobias points out, Help & Manual does not currently use variables from the repository (but this feature may be added in a future version). However, if you can script the processing of a text file (the main .hmxp file is a plain text XML file) -- for example with a grep tool with command line support like PowerGrep or WinGrep -- you can automate the process of adding or modifying variables that way. You can find the variables down towards the end of the project file in the <variables> section. You can use your existing variables there as a model. The basic syntax of variable entries is:

Code: Select all

<variable id="VAR_NAME" type="text" translate="true">Variable Text</variable>
The id= is the variable name, which must always be all upper case, no spaces or special characters allowed. the type= can be "text" or "html". The translate="true" means the variable is editable in Help & Manual. If you leave it out it is "protected".
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Dave Dunn
Posts: 3
Joined: Fri Sep 28, 2012 6:45 pm

Re: Automated Variable Import

Unread post by Dave Dunn »

Thanks for your help. I'll look into it.
Post Reply