Community
Meshmixer
Welcome to Autodesk’s Meshmixer Forums. Share your knowledge, ask questions, and explore popular Meshmixer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mmAPI Error/Dialog handling

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
554 Views, 2 Replies

mmAPI Error/Dialog handling

Hello,

 

I am currently working on a project where i use mmAPI and Python to automate a repair process for broken .stl files and calculate the boolean difference of repaired meshes. With the help of various @MagWeb posts i managed to accomplish this. I sometimes run into dialogs when trying to save a mesh (see attached picture) or errors when for example the boolean difference calculation failed. My question is: Is there a way to handle those dialogs / errors within my python script without clicking back into meshmixer and manually click "continue"?

Thank you in advance! 🙂

Labels (2)
2 REPLIES 2
Message 2 of 3
MagWeb
in reply to: Anonymous

There's no way I know handling such dialogs within mmApi

 

On WIN10 and my Phython3 built of mmApi I do some workaround to handle such cases:

  1. Pass the focus over to MM
  2. Emulate a key (either ENTER or (if needed) ESC)

ad 1: I use pygetwindow library

ad 2: I use keyboard library

 

 

 

 

import pygetwindow as gw
import keyboard

# set focus to Meshmixer
MM = gw.getWindowsWithTitle('Autodesk Meshmixer')[0]
MM.activate()

# hit enter to accept dialog
keyboard.press_and_release('enter')

### alternative: hit esc to cancel dialog
##keyboard.press_and_release('esc')

 

 

 



Gunter Weber
Triangle Artisan

Message 3 of 3
Anonymous
in reply to: Anonymous

Thank you for your reply. I didn't think of this. Will definitely try this out. 🙂

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report