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: 

Is it possible to show the user only the result of a process?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Passi
601 Views, 4 Replies

Is it possible to show the user only the result of a process?

Hi,

 

I have a function programmed in vb.net that controls the opacity of parts in the active view.

If the user is selecting objects and then starting the program the "non-Selected" Parts are disapearing step by step.

 

That's looking very intersting, but doesn't supports the user 🙂

 

Is it possible to freeze the active view of inventor and refresh it, when the job is done? So the user will only see the result of the process and not the working process.

 

Best Regards

 

Passi

4 REPLIES 4
Message 2 of 5
jdkriek
in reply to: Passi

I know in iLogic it would be something like:

 

InventorVb.DocumentUpdate(False)

Which would update the document, but not the display.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 5
Mike.Wohletz
in reply to: Passi

Have you tried to wrap all your work up into a single transaction? This should prevent this from happening until the transaction is committed and possible solve your problem. I have not tested this but is just a thought. 

 

Message 4 of 5
Robert..F
in reply to: Passi

The following code will do what you'd like to accomplish while dramatically increasing performance as well.

 

Sub PerformanceIncrease()

    Dim Invapp As Inventor.Application
    Set Invapp = ThisApplication

    Dim oDoc As Inventor.Document
    Set oDoc = Invapp.ActiveDocument

    '' Turn off user interaction so that inventor can focus on your API calls exclusively
    Invapp.UserInterfaceManager.UserInteractionDisabled = True
    
    '' Turn off screenupdating to speed up performance
    Invapp.ScreenUpdating = False
    
    '' Set Defer updates to true and force an update when you're finished with your API commands
    '' This can be done on drawings and sketches as well
    Invapp.AssemblyOptions.DeferUpdate = True
  
    ''Wrap your command into a global transaction so only one undo point is created.
    Dim oTrans As Inventor.Transaction
    Set oTrans = Invapp.TransactionManager.StartGlobalTransaction(oAssDoc, _
        "My API Calls")
        
    '' perform your functions here
    
    '' Be sure to end a global transaction when you are finished
    oTrans.End
        
    '' Wrap up
    Invapp.ScreenUpdating = True
    Invapp.UserInterfaceManager.UserInteractionDisabled = False
    Call oDoc.Update
    Invapp.AssemblyOptions.DeferUpdate = False
    

 

 

 

Message 5 of 5
Passi
in reply to: Passi

First of all thanks a lot and ii to all of you.

 

Sorry for my late answer, but I try to make it as complete as possible 🙂

 

- The iLogic functionality only starts a "manual" refresh if needed. But it doesn't gives you the oppotunity to supress automatically generated inventor refreshs.

 

- The Transaction I've tried, because I also thought it might be some sort of solution. But it doesn't work for this Problem.

 

- The Inventor.Application.ScreenUpdating was the function, I've missed. So, that's the solution. If you want to show any inventor action, the value should be true or false, and you're right, it also improve the performance.

 

So, again thanks to all of you and I marked it as solution.

 

Best Regards

 

Passi

 

 

 

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

Post to forums  

Autodesk Design & Make Report