Inventor General

Reply
Distinguished Contributor
zdhrichard
Posts: 120
Registered: ‎05-03-2011
Message 1 of 30 (254 Views)

Does anybody know how to close an application (*.ipt & *.iam) by ilogic code?

254 Views, 29 Replies
03-26-2013 05:03 AM

Does anybody know how to close an application (*.ipt & *.iam) by ilogic code?

 

I tried to use

           ThisDoc.Document.close (True)

to close it.

Indeed, it can close the application, but there is an error occurred as following:

           Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

Does anybody know how to avoid this error or any other way to close (or exit) the application?

Rich

Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
*Pro
jletcher
Posts: 1,860
Registered: ‎05-18-2011
Message 2 of 30 (245 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 05:28 AM in reply to: zdhrichard

Do you want to close Inventor or just close the part?


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
Distinguished Contributor
zdhrichard
Posts: 120
Registered: ‎05-03-2011
Message 3 of 30 (240 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 05:37 AM in reply to: jletcher

Just *.ipt or *.iam.

Rich

Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
*Pro
jletcher
Posts: 1,860
Registered: ‎05-18-2011
Message 4 of 30 (228 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 05:56 AM in reply to: zdhrichard

OK need some more info or understanding.

 

You have a part that has ilogic to make the part then after you make the part you want it to close?

 

 

see we have to understand your steps in what you are doing with it.

 

 

 


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
Distinguished Contributor
zdhrichard
Posts: 120
Registered: ‎05-03-2011
Message 5 of 30 (221 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 06:06 AM in reply to: jletcher

You are right.

The reason is I do not want other people see my codes.

So, I have a *.ipt (or *.iam) file with codes (we coudl call it parent-model?). When it is opened, it will start to ask user to input part number to generate the model (child-model?).

So, when child-model is generated, I will use codes to delete all rules in child-model which you and Mike help me to get this already.

Now, because I do not want the user to see my rules. So, I need close the parent-model immidiately after user get the child model.

I just get a code which could close Inventor

         ThisApplication.Quit

But it is better just close the parent-model instead of Inventor.

Do you know any code can do this way?

Rich

Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
*Pro
jletcher
Posts: 1,860
Registered: ‎05-18-2011
Message 6 of 30 (214 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 06:23 AM in reply to: zdhrichard

I think your issue may be with the ilogic code you have to delet all ilogic.

 

you may have to leave the ilogic that closes the main file if you are deleted them all the error is you are deleting the closed part too.

 

This is a guess without seeing the code you have to delete all ilogic.

 


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
*Pro
jletcher
Posts: 1,860
Registered: ‎05-18-2011
Message 7 of 30 (212 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 06:26 AM in reply to: jletcher

Or try this

 

oPartDoc.Close

 

 

 


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
Distinguished Contributor
zdhrichard
Posts: 120
Registered: ‎05-03-2011
Message 8 of 30 (207 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 06:33 AM in reply to: jletcher

No. The iLogic code in child-model could be delete by rules already.

 

Now, I just want to close the parent model (*.ipt or *.iam) in order user cannot see my rules.

Rich

Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
Distinguished Contributor
zdhrichard
Posts: 120
Registered: ‎05-03-2011
Message 9 of 30 (206 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 06:35 AM in reply to: jletcher

Hello James,

 

Thanks lot for your reply. But could you please let me know what the type of oPartDoc is? We need declare it before use it, right?

Rich

Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
*Pro
jletcher
Posts: 1,860
Registered: ‎05-18-2011
Message 10 of 30 (195 Views)

Re: Does anybody know how to close an application (*.ipt & *.iam) by ilogic

03-26-2013 06:44 AM in reply to: zdhrichard
Dim oPartDoc As PartDocument

 


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(

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
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

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