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: 

MM api import Mesh

1 REPLY 1
Reply
Message 1 of 2
nmhoogeweg
177 Views, 1 Reply

MM api import Mesh

Hi! 

I want to automatically import a mesh / append a mesh to my object list by using the following code: 

 

 

import os
import mmapi
from mmRemote import *
import mm

remote = mmRemote()
remote.connect()

CYL_5_3 ='cylinder_5_3.obj'
mm.scene.append_objects_from_file(remote, CYL_5_3)

 

 

But nothing happens and I also don't get an error message. I've tried the cylinder file as an obj. stl. and mix. document, but this doesn't matter. 

 

Could someone help me? Thanks in advance! @MagWeb 

 

 

 

1 REPLY 1
Message 2 of 2
MagWeb
in reply to: nmhoogeweg

Using relative paths there are some strange things happening on certain file names.

Assuming a .obj in the same directory as the .py this works:

import os
import mmapi
from mmRemote import *
import mm

remote = mmRemote()
remote.connect()

CYL_5_3 ='test.obj'
mm.scene.append_objects_from_file(remote, CYL_5_3)

While this doesn't:

import os
import mmapi
from mmRemote import *
import mm

remote = mmRemote()
remote.connect()

CYL_5_3 ='cylinder.obj'
mm.scene.append_objects_from_file(remote, CYL_5_3)

 No idea why...

Using full paths instead works fine.



Gunter Weber
Triangle Artisan

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

Post to forums