Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ThisApplication.ActiveDocument fails?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
mrattray
707 Views, 5 Replies

ThisApplication.ActiveDocument fails?

I have a macro that is called from a loop cycling through all the sheets in a drawing and exporting information from the titleblocks to a property matrix that is then exported to excel. These macros have run jus fine and have not been modified for a few months now. I now have a drawing that's a bit larger than most, 66 sheets. I've ran this macro through it several times before but now it decided that it doesn't like a certain sheet. It fails with an "Automation Error" on the oDoc=ThisApplication.ActiveDocument line on sheet number 61. What could cause that? What does it mean? Did Inventor loose itself? I haven't a clue where to even start looking for the problem.

 

capture.jpg

 

Mike (not Matt) Rattray

5 REPLIES 5
Message 2 of 6
ekinsb
in reply to: mrattray

Can you send me the drawing and a minimal version of your program so we can try and reproduce the problem here?  You can send it to brian.ekins@autodesk.com.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 6
mrattray
in reply to: ekinsb

Brian,

I'd be delighted to have your help on this. I've tried minimalizing the program, but then I can't reproduce the behaviour. I have a suspicion that the problem has to do with a hidden prop set with over 650 props I'm using to transfer data with. I started a pack & go to get an idea of file size and it told me something like 40MB uncompressed. I don't mind sending you that much data if you don't mind recieving it. Otherwise, I'll have to play with it until I can get a minimalized verison that displays the behaviour or find the bug.

Thanks,

Mike

Mike (not Matt) Rattray

Message 4 of 6
ekinsb
in reply to: mrattray

Hi Mike,

 

I'm ok getting a large data set.  I assume it's just Inventor files to exercise the program rather than a lot of code.  It's the code that the most important to minimize. 

 

-Brian


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 6
mrattray
in reply to: ekinsb

Brian,

I just discovered that our attachment limit here is only 10MB. Like I mentioned before, when I slim it down too much I can't reproduce the behaviour.  The smallest I can get it to where the error still occurs is 22.5MB packed and zipped. The bulk of the file is just the drawing itself, there isn't a whole lot of code involved. Is there an FTP site or something you can direct me to?

Thanks,

Mike

Mike (not Matt) Rattray

Message 6 of 6
mrattray
in reply to: mrattray

Well it turns out that reordering the trouble sheet from 61 to 60 somehow fixed the problem. It runs fine now. Smiley Frustrated

Mike (not Matt) Rattray

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report