import sketchup files using Python

import sketchup files using Python

Anonymous
Not applicable
3,814 Views
7 Replies
Message 1 of 8

import sketchup files using Python

Anonymous
Not applicable

How to import sketchup furniture models using python code in 3ds Max?

0 Likes
Accepted solutions (1)
3,815 Views
7 Replies
Replies (7)
Message 2 of 8

drew_avis
Autodesk
Autodesk
Accepted solution

Something like this should work:

import pymxs
from pymxs import runtime as rt
myfile = 'C:\\Users\\avisd\\Desktop\\Sample+House.skp'
rt.importFile(myfile, using=rt.sketchUp)

Hope that helps,

Drew



Drew Avis
Content Experience Designer
Message 3 of 8

Anonymous
Not applicable

Thanks but the method is always returning false and not importing anything. I tried it with different files and different paths.

Any idea why? 

0 Likes
Message 4 of 8

drew_avis
Autodesk
Autodesk

What version are the sketchup files?  Max can import Sketchup 2014 and lower.  

 

Drew



Drew Avis
Content Experience Designer
0 Likes
Message 5 of 8

Anonymous
Not applicable

they are 2014. I can successfully import them manually, scripting is when the issue occurs. 

0 Likes
Message 6 of 8

drew_avis
Autodesk
Autodesk

What version of Max are you using?  Can you post your code snippet?

 

Drew



Drew Avis
Content Experience Designer
0 Likes
Message 7 of 8

Anonymous
Not applicable

I fixed the problem. I needed to add .skp at the end of the file name. Thank you!

0 Likes
Message 8 of 8

drew_avis
Autodesk
Autodesk

Aha!  Glad you figured it out.

 

Drew



Drew Avis
Content Experience Designer
0 Likes