iLogic: .GLB export issue on Inventor Server

iLogic: .GLB export issue on Inventor Server

talal_shahidAFKNS
Participant Participant
304 Views
2 Replies
Message 1 of 3

iLogic: .GLB export issue on Inventor Server

talal_shahidAFKNS
Participant
Participant

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)
0 Likes
305 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

The parameters are not declared:

bradeneuropeArthur_0-1748002261398.png

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

talal_shahidAFKNS
Participant
Participant

Here i have only provided the section of the code which is responsible for generating the .glb file. parameters are declared in the upper portion of the code. Also, the code is working fine locally so it can't be an issue with the parameters.

0 Likes