Skip to content
Create global funct...
 
Notifications
Clear all

Create global function

5 Posts
4 Users
0 Likes
1,037 Views
Avatar
Posts: 8
Customer
Topic starter
(@agy79a6q5vx0nbjjxy0vsixsg9b3)
Active Member
Joined: 2 years 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
Mitzu Ganley
Posts: 10
Admin
(@mitzu-ganley)
Member
Joined: 3 years 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
Avatar
Posts: 8
Customer
Topic starter
(@agy79a6q5vx0nbjjxy0vsixsg9b3)
Active Member
Joined: 2 years 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
Mitzu Ganley
Posts: 10
Admin
(@mitzu-ganley)
Member
Joined: 3 years ago

Awesome - glad it worked for you! 

Reply
Lonnie Chrisman
Posts: 40
Admin
(@lchrisman)
Member
Joined: 14 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: