Create global funct...
 
Notifications
Clear all

Create global function

5 Posts
3 Users
0 Likes
192 Views
Posts: 8
Customer
Topic starter
Active Member
Joined: 1 year ago

I have a function within a model. How do I export that to be a function usable in other models?  I have the function within an exisitng modl. I put it in a module and set the model's class to Filed module. Now what?  

4 Replies
Posts: 7
Admin
Active Member
Joined: 1 year ago

Hello Paul, 

Thanks for reaching out and sharing your question. Here is a note from our developers:

You did exactly the right thing -- i.e., you placed the function in a module and then changed it to be a Filed Module.  Because it contains a function, "Filed Library" would match the intent a bit better, but a Filed Module works fine. 
 
So what you now need to do is this... In your other model, where you want to use the function, select "Add Module..." on the File menu while in Edit mode, and click on the Filed Module file. It'll ask whether you want to link or embed. You'll probably want to link. The function will now be available.
 
Note: You can use "Add Module..." or "Add Library..." to do this. They are functionally identical, the only difference being that the folder that the file selector dialog opens to initially.
Hope this helps. If not, please reach back out and we will continue to assist.
 
Happy modeling! 
 
Best,
Mg
Reply
Posts: 8
Customer
Topic starter
Active Member
Joined: 1 year ago

Thanks. The new function I had created was part of an existing model.  I needed to save-as to the name of the intended function (new_function.ana) and then delete all elements of the model except the filed module with the function.  Then I could do as you suggested to use the new function in other models.  Works like a charm.

Reply
Posts: 7
Admin
Active Member
Joined: 1 year ago

Awesome - glad it worked for you! 

Reply
Posts: 25
Admin
Eminent Member
Joined: 12 years ago

Glad you got it to work.

Your original posting said that you "put it in a module and set the model's class to Filed module."  You should have changed the module's class to Filed module (not the top-level model's class). It will ask you for a file name for the filed module. That will save you  next time from the step of having to "delete all elements of the model except the filed module with the function."  

Reply
Share:
Scroll to Top