Inventor General

Reply
Contributor
RPdAnjou
Posts: 29
Registered: ‎06-06-2011
Message 1 of 3 (411 Views)

API - VB.Net - Add-In - How to release a document object correctly

411 Views, 2 Replies
03-27-2012 02:49 AM

Hi,

 

I have made a VB.Net Add-In for Inventor 2011, in a few functions it opens one or more files or sets a reference to already opened files. The release of the resource to this documents seems to be the problem.

 

In PDM (Productstream Pro) we want to change document states and there for the documents have to be closed in Inventor. When using some Add-In functions prior to the state change in PDM, we get a message from PDM that Inventor still has the files open but inventor does not show any open files (of course we can not see files that were opened in the background).

 

Only manual operation to solve this is to close inventor or open the drawing and the part used on the drawing and close them top down (drawing first, then part).


In short, I'm stuck with open files that don't seem to be open.

 

I think this is because the add-in sets a reference to the part used on the drawing and then changes something in the drawing.

 

How do I release the resources correctly?

Or, what else can I do to prevent this from happening?

*Expert Elite*
Mark_Wigan
Posts: 437
Registered: ‎03-07-2006
Message 2 of 3 (398 Views)

Re: API - VB.Net - Add-In - How to release a document object correctly

03-27-2012 06:54 AM in reply to: RPdAnjou

hello,

 

maybe you could post this question in the Customisation area of the forum.

 

also if possible post your code so we can see what your functions are working on.

 

thanks.

best regards,
- Mark

PDSU 2014 Windows 7, 64bit. (please consider Kudos or Tag as Solved if your issue is sorted)

Contributor
RPdAnjou
Posts: 29
Registered: ‎06-06-2011
Message 3 of 3 (381 Views)

Re: API - VB.Net - Add-In - How to release a document object correctly

03-28-2012 01:40 AM in reply to: Mark_Wigan

That seems like a better place, thanks!

 

Admin, could you please move this topic to Inventor Customisation?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube