Submitted by aov on Fri, 06/03/2016 - 09:20
Forums:
Hello, I would like to combine a macro with a Journal.
I’ve a macro and now I created a journal to export drawings to PDF, I need that this journal first call and execute the macro and then exporting to PDF.
The problem is the macro doesn’t execute until the journals ends.
What can I do to make the macro run before the rest of the Journal?
Thanks in advance.
re: combine macro and journal
NX macros and journals do not mix especially well. You will be better off in the long run reworking your journal to do all the work (or reworking the macro if you would rather do that).
re: combine macro and journal
Yes I know, but I haven't other choice. The macro, works with a compiled dll file and I can't rework my journal for introduce it.
My only solution is to call this macro from the journal but occur the problem that I previously commented.
Can you think of some way to make it work properly?
Thank you very much for your help
re: macro & journal
If you have a .net author license, you should be able to compile your code and freely call the existing dll.
If you must run your code as a journal (no author license), you can try the function mentioned in this eng-tips thread. I've never tried it, so I can't comment on how well it works or what issues may arise.
http://www.eng-tips.com/viewthread.cfm?qid=367518
This function is I was using
This function is I was using and I get the problem that said, it seems the only solution is compiling.
If anyone knows another solution please tell me.
Anyway thank you very much.