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: 

Application Speed

7 REPLIES 7
Reply
Message 1 of 8
bkline1
450 Views, 7 Replies

Application Speed

Is there a way to control the speed at which an executable file runs? Wrote an executable file that manipulates inventor, it seems as if it runs to fast for Inventor to keep up or manipulates Inventor too quickly then IV11 fails. It never seems to fail in the same place.

 

Bill

7 REPLIES 7
Message 2 of 8
Ralf_Krieg
in reply to: bkline1

Hello

 

Is your application multithreaded? If not, afaik your application waits after every command send to inventor until inventor returns "ready". So your problem must be at other point. What manipulates your application? A little bit more information and maybe some code could help figure out your problem.


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 3 of 8
bkline1
in reply to: bkline1

Hello, thanks for the reply...

 

First, I would not say that I'm a beginner. But I would classify myself as a novice user of VB. I used VB Express to start a session of IV11, open and manipulate standard models then create a 2d drawing then shut down again. So with that being said... I'm not familiar with what "multithreaded" means... As far as the code. This application is huge and really would not work to send to someone to try and run themselves. It pulls tons of stuff from our network etc... Plus the company I work for considers it to proprietary information. It puts me at a disadvantage trying to find help when I run into issues.

 

This is the thing of it. I programmed it locally on my hard drive running my seat of Inventor. The application runs every time without any issues. When I build the application and transfer it to the network where we have a dedicated seat of IV11, the application fails every time.... It fails with a fatal error wanting to give the email notification to Autodesk. I set up the network seat exactly like my seat. I have no idea how to find out what is different between the two.... The only real thing is the speed at which the application runs. So I was guessing at that....

Message 4 of 8
Ralf_Krieg
in reply to: bkline1

Hello

 

Multithreaded means your application starts 2 or more parallel processes. This could be a problem if one process makes an action in inventor based on the result of an action of the other process, but this process has not finished. For example process 1 creates a new part and do something time expensive and process 2 creates a drawing of the part, but the part is not saved at this point. So process 2 trys to make a base view from a part that physically do not exist on harddisk.

 

You can try to find the point of error with a try-catch-statement:

 

Publib Sub YourSubName()
Try

'put here your code

Catch ex As Exception
   System.Windows.Forms.MessageBox.Show(ex.Message & vbNewLine & vbNewLine & ex.ToString)
End Try

End Sub

 If your Sub runs in an error a messagebox will be displayed. Maybe this helps.


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 5 of 8
bkline1
in reply to: Ralf_Krieg

Ok... So no, my application is not a multi-thread application. It is simple in so much as it executes each task one after the other in order.

 

I do have a catch set-up as you have suggested. I have it set up to give me the location, line and module the application errored out at... I have it set up to send me an email instead of a messagebox (but fundamentally the same). The problem is my application fails in different locations every time it runs. It's real inconsistent. As I previously mentioned the application runs just fine on my computer...

Message 6 of 8
Ralf_Krieg
in reply to: bkline1

Hi

 

And what kind of exception throws your application as it fails? Oh wait, everytime another and it's all propietary information. Sorry, but if you don't provide some more information as only "my application fails" nobody can help you.


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 7 of 8
bkline1
in reply to: bkline1

Look..... I appreciate your effort to help. It's not a code error! Can you answer my original question... Can you control the speed at which an application runs without using a ton of Pauses within the code?

Message 8 of 8
bkline1
in reply to: bkline1

Actually, I have to admit that I'm wrong. I believe that I do have a multithread application. I use VB to start a instance of Inventor. VB is executing commands without monitoring where Inventor is at so VB moves on when Inventor is not done with my previous expression.

 

How do I get my application to wait until Inventor is ready to move on?

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

Post to forums  

Autodesk Design & Make Report