heyho, ok the problem is not that easy but I can hardly find information about that. At least nothing that helps me. I have several functions in my .ms file They are not inside of anything. Now I want to create some macroscripts that call these functions instead of putting the function itself inside the macroscript. Now…
I just found a better answer. I too wanted to call a function from the UI. You need to pre-initialize any function you want to call from the UI. This allows the script to access a function that is not yet defined. Similar to the following article.…
well, not exactly what I was looking for but it does work. I have split the script into UI stuff and core functions and use include "fnctions.ms" at the start of my macroscripts thx!
I use this thread since i have a problem which is simliar to this problem: I've a function and want to include some code but get an error when i execute master.ms :( Any ideas? MASTER.MS SLAVE.MS ERROR
Actually, against logic, the Macroscript and UserMacro folders are evaluated before the Scripts/Startup and UserStartup folders. (The name suggests the opposite.) This is because Startup scripts, unlike macros, have access to the viewports and can create and manipulate objects. If you want to use functions in MacroScripts…
Bobo (the other one) explains why this doesn't work here: http://forums.cgsociety.org/showpost.php?p=4137629&postcount=2 You'll need to use a global variable with fileIn. Typically I'll make a global struct and house all my variable in there. That way you only have one global. I'll even put the functions in it. struct…