Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to tweak the iLogic Snippet for "Save As IGES File" so that it will save the file to a new folder called "IGES" and have the file name be the iProperty "Part Number". I can add "iProperties.Value("Project", "Part Number")" at the file name part, but it still has the original name that i have to go back and delete. I just want the file named as the Part Number and put in a new folder.
Help!
Here is the current code i have:
' Get the IGES translator Add-In. Dim oIGESTranslator As TranslatorAddIn oIGESTranslator = ThisApplication.ApplicationAddIns.ItemById("{90AF7F44-0C01-11D5-8E83-0010B541CD80}") Dim oContext As TranslationContext oContext = ThisApplication.TransientObjects.CreateTranslationContext Dim oOptions As NameValueMap oOptions = ThisApplication.TransientObjects.CreateNameValueMap If oIGESTranslator.HasSaveCopyAsOptions(ThisApplication.ActiveDocument, oContext, oOptions) Then ' Set geometry type for wireframe. ' 0 = Surfaces, 1 = Solids, 2 = Wireframe oOptions.Value("GeometryType") = 1 ' To set other translator values: ' oOptions.Value("SolidFaceType") = n ' 0 = NURBS, 1 = Analytic ' oOptions.Value("SurfaceType") = n ' 0 = 143(Bounded), 1 = 144(Trimmed) oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism Dim oData As DataMedium oData = ThisApplication.TransientObjects.CreateDataMedium oData.FileName = ThisDoc.PathAndFileName(False) & iProperties.Value("Project", "Part Number") & ".igs" oIGESTranslator.SaveCopyAs(ThisApplication.ActiveDocument, oContext, oOptions, oData) End If
Solved! Go to Solution.