Hours of frustration. So I have all these great plans to develop my “click here and view in Navisworks” ideas. Dozens of good plans and I am thwarted by it only running once. Googling, there are other people with other apps that “only work once” when you are connecting to RUNNING instances of them via ActiveX.
Bottom line: when using GetObject “Navisworks.Document.10”) and ensuring you can connect to the 2nd, 3rd, 4th, etc. times, you have to choose ‘document.StayOpen’. This sets a special flat in the ROT table (keep reading) to tell it not to go away when you are done with it. You application wil LOOK like it is running and it is, but the reference to it being ‘grab-able’ is gone. Microsoft applications have Application.UserControl = True, which does the same thing, this (on hour #3 of researching what was going on) inspired me to see if navisworks had anything. Nope, nothing – it didn’t work – EXCEPT for the StayOpen is not a property but a method that sets this flag to True. Holy smokes – it all works and every time now. I CAN COMPLETE MY DREAMS I HAVE IN MY HEAD NOW!!! The motivation, is that we have to give a presentation to the customer’s VP. No pressure 1 week before we are doing this. I will be working the weekend to impress the client’s VP and having a job for the next little while.
Links and learning to follow – you can stop reading now if you wish.
Continue reading →