mesh is not a problem.
I’m trying to build a script to export 3dm to skp. The above popup keeps confusing me because I could not close it via rs. Thanks.
It’s telling you there are 8 mesh edges that are not valid and might cause problems in Sketchup. Would have to have a test file to see if there is any workaround to avoid this popping up.
I have huge numbers of these kinds of 3dm. Almost all of them have the above prompt when I try to export.
Attached one of them. Thanks. canape salon s.3dm (265.5 KB)
That surface is completely awful, no wonder it’s creating a bad mesh on export…
However, if you use the -dash version of the Export command i.e. _-Export, you will get the error message printed to the command line and not the dialog popping up.
Maybe the following batch export/convert script might help:
Did you try my script above? It works on the file you posted above without the error dialog coming up. It uses SaveAs, not Export, but I think that may not matter. Because on that file as well, here (V7 SR22 RC) if run the -_Export command manually (not in a script), then browse to a location and specify Sketchup as the file format, it exports the file without the error dialog coming up.
The following test script also exports the object in your file above without the error dialog popping up:
import rhinoscriptsyntax as rs
def GetSKPSettings():
e_str = "_SaveAsType=SketchUp2021 "
e_str+= "_ExportPlanarRegionsAsPolygons=_Yes "
e_str+= "_CullUnnecessaryVertices=_Yes "
e_str+= "_MinimumFaceCount=2 "
e_str+= "_Enter"
return e_str
def TestSKPExport():
objs=rs.GetObjects("Select objects to export",8+16+32,preselect=True,select=True)
if not objs: return
e_file_name=rs.SaveFileName("Save SKP","Sketchup Files (*.skp)|*.skp")
if not e_file_name: return
rs.Command('-_Export "{}" {}'.format(e_file_name,GetSKPSettings()),False)
TestSKPExport()
Yes, that was just a test script to see if the error message dialog on saving could be avoided - which you have seen it can.
There is no need to have any user interaction with either -_Export or -_SaveAs, you just need to supply a valid file name/path to the command string in the script. My script in post #7 above does that.
Feel free to post some code that is not working and someone will look.
Hi @Helvetosaur - Was interested in seeing what this script does, so I tried it out, but received the following pop up (and FYI, no biggie if you don’t get time to reply, but figured I’d post the info.)
EDIT: I looked at the script, and the final line calling the script has the wrong word in it: Convert instead of Export
Hmm, odd, I don’t even have that one saved here. Yes, if you change the last line, I guess it should work. Might have been a quick change that I didn’t do correctly but never saved. Thanks for the heads-up.