Message 1 of 3
iLogic: .GLB export issue on Inventor Server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to export the .glb file format in inventor using iLogic. I have written the required code and it is working fine when i run it on my PC. However, when i use the same code to generate .glb file on "Inventor Server", the exported .glb file does not show all of the components which are present inside my assembly file. I have used 2 different approaches to export the .glb file (by using "Save As" command and by using the "Translators") and both of them seem to be working fine on the local run but don't seem to produce the desired results when run on "Server". Anyone can help me with this? Below is my code to create .glb file using the "Translators".
Dim odoc As Document Dim ocompdef As ComponentDefinition odoc = ThisDoc.Document ocompdef = odoc.ComponentDefinition Dim oOBJ As TranslatorAddIn For Each oAppAddin As ApplicationAddIn In ThisServer.ApplicationAddIns ' MsgBox(oAppAddin.AddInType) If oAppAddin.DisplayName = "Translator: glTF" Then ' MsgBox(1) oOBJ = oAppAddin End If Next 'The following lines create the needed input variables Dim oTO As TransientObjects = ThisServer.TransientObjects Dim oContext As TranslationContext = oTO.CreateTranslationContext oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism Dim oOptions As NameValueMap = oTO.CreateNameValueMap Dim oDataMedium As DataMedium = oTO.CreateDataMedium Dim tDoc As Inventor.Document = ThisDoc.Document savePath = ThisDoc.WorkspacePath & "\" oBaseName = GLB_PREFIX & CStr(FAN_SIZE) & "_" & Parameter("JOB_NUMBER") oDataMedium.FileName = System.IO.Path.ChangeExtension(savePath & oBaseName, ".glb") oOBJ.SaveCopyAs(odoc, oContext, oOptions, oDataMedium) ThisDoc.Document.SaveAs(savePath & saveName & ".GLB", True)

