I have an iLogic rule that saves out a part to STL.
It works well but is saves under a low resolution and effects the quality of my 3D prints.
I tried to do some changes as you see in the script below but they didn'tresultt in a better outcome.
Looking forward to your suggestions.
oPath = ThisDoc.WorkspacePath
Dim STLAddIn As TranslatorAddIn
STLAddIn = ThisApplication.ApplicationAddIns.ItemById("{81CA7D27-2DBE-4058-8188-9136F85FC859}")
Dim oDocument As Document = ThisDoc.Document
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
' Check whether the translator has 'SaveCopyAs' options
If STLAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
oOptions.Value("OutputFileType") = 0 ' 0 = Binary , 1 = ASCII
oOptions.Value("ExportUnits") = 5 ' units = mm
'********* here I want to set the resolution to high, but unsuccessfully ***********
oOptions.Value("Resolution") = High 'the output staysin a poorly low resolution.
'********************************************************
oOptions.Value("ExportColor") = True
End If
'Set the destination file name
oDataMedium.FileName = ThisDoc.ChangeExtension(".stl")
'Publish document.
Call STLAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
MessageBox.Show("The STL file is created and saved in " & oPath , "Info")
Solved! Go to Solution.
Solved by t_hascj. Go to Solution.
Hi JerisSteurs1246,
Try this code:
oOptions.Value("Resolution") = 0
Resolution | HIGH = 0 MEDIUM = 1 LOW = 2 CUSTOM = 3 BREP = 4 |
http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-25D24E28-7517-4903-8AEE-123F8C71A89E
Thanks,
Jaroslav
Can't find what you're looking for? Ask the community or share your knowledge.