Missing File - .xmod

Vaughn
Vaughn Altair Community Member
edited October 2019 in Community Q&A
I am trying to bring old version 11 models (.xmod)  into version 15 (.dmod) of monarch. Every time I bring one in. I get a Missing File Error box that pops up. ​​Is this just a file for old .xmod models or do I need to fix something in my models?


UserDefinedFunctions.xmod is the file it says its missing.
------------------------------
Vaughn Mitchell
Data Analyst
------------------------------
Tagged:

Answers

  • Steve Caiels_21881
    Steve Caiels_21881
    Altair Employee
    edited October 2019

    Hi Vaughn,

    It is very unlikely to be causing a problem . . . skip to halfway down to ignore the explanation and stop it popping up!

    External models were initially designed to give Monarch users the ability to store complex functions without having to recreate them each time they were used.  If these functions were placed in the default "UserDefinedFunctions" model (UDF) and distributed to colleagues, they would be available to everybody. There are also some pre-built functions stored in the UDF.

    For example, In version 11 of Monarch, there is a User Defined function called Pi().  If you have a numeric field with the Radius of a circle, you could create a calculated field of [Radius] * 2 * Pi() to get the circumference.

    Pi() is a function stored in the UDF that equates to 3.14159265, so without the user defined model, you would have to use [Radius] * 2 * 3.14159265.

    By default, when you use a function from the UDF, it is copied into the active model. Therefore, it doesn't matter if the UDF model becomes unavailable in the future.  However, if you had a new Monarch session without access to the UDF, you would not have access to the Pi() function.

    Please be aware that it is possible to change this behaviour in the V11 model so that a link was created to the UDF instead of the function getting copied.  If that was done, any calculated fields that used an external function will only work when the UDF can be located.

    To fix it  . . . .

    Assuming the defaults were not changed, and you therefore don't need the UDF, you can just ignore the message.

    If you prefer to stop the message, you would need to fix the reference to the external model.

    Most convenient would probably be to locate the original UserDefinedModle.xmod and place it where Version 15 is expecting to see it.  You only need to do this once.

    NB Something that worked for me, but please use caution, was to create a 'dummy' 0 byte text file called 'C:\Users\Public\Documents\Monarch\Models\UserDefinedFunctions.xmod'.  I did not test beyond opening the V11 model, but it was able to load without giving the warning.

    Alternatively, you could delete the reference to the UDF xmod version, but you'll have to do this for all your xmod files.

    Both options are available in Table Design->Functions->Manage External Functions.

    Regards,
    Steve.

    ------------------------------
    Steve Caiels
    Professional Services
    Altair
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-22-2019 02:41 PM
    From: Vaughn Mitchell
    Subject: Missing File - .xmod

    I am trying to bring old version 11 models (.xmod)  into version 15 (.dmod) of monarch. Every time I bring one in. I get a Missing File Error box that pops up. Is this just a file for old .xmod models or do I need to fix something in my models?


    UserDefinedFunctions.xmod is the file it says its missing.
    ------------------------------
    Vaughn Mitchell
    Data Analyst
    ------------------------------
    "
  • Mahmoud
    Mahmoud
    Altair Employee
    edited October 2019
    Hi Vaughn,
    When you create a new Classic model, Monarch also include the UserDefinedFunctions.xmod (UDF) model.  The UDF model contains functions that were shipped with Monarch as well as user's own functions.  If you use any of UDF function in your active model, Monarch imports that function in your active model.  When you save it your active model, Monarch also saves the path to the UDF in your active model.

    Chances are you are not using any of the functions in the UDF model, and if you used any it would be part of your model.  So, you may ignore this warning message.   
    When you open your model you can go to table design, click on the Functions button, click on the Manged External Functions button and change the UDF model path to new location.  On Windows 10 OS the location of UDF is in 'C:\Users\Public\Documents\Datawatch Monarch\Models' folder.
    Regards
    Mo

    ------------------------------
    Mahmoud Abdolrahim
    Senior Implementation & Integration Engineer
    Datawatch Corporation
    MA
    (978) 935-3840
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-22-2019 02:41 PM
    From: Vaughn Mitchell
    Subject: Missing File - .xmod

    I am trying to bring old version 11 models (.xmod)  into version 15 (.dmod) of monarch. Every time I bring one in. I get a Missing File Error box that pops up. Is this just a file for old .xmod models or do I need to fix something in my models?


    UserDefinedFunctions.xmod is the file it says its missing.
    ------------------------------
    Vaughn Mitchell
    Data Analyst
    ------------------------------
    "