ILogic Export IGS and Images Code? [Help]

ILogic Export IGS and Images Code? [Help]

Astrolabe2015
Explorer Explorer
393 Views
0 Replies
Message 1 of 1

ILogic Export IGS and Images Code? [Help]

Astrolabe2015
Explorer
Explorer

Hello everyone,


I've been looking for a code to export images (.png, .tiff and .jpg) and .igs at the same time. So i tried to contact the Autodesk support so that someone could try to help. After I exposed my vision of what this code could've done I've got a reply with a code that was later told to be a sample template and that the support couldnt help me with this since he/she had not enough knowledge of iLogic to help me, the code goes as follows:

 

'Export to JPG

Dim oPart = ThisDoc.Document 

oPart.SaveAs("c:\temp\export.jpg", True)


 

Dim oIges = ThisApplication.ApplicationAddIns.ItemById("{90AF7F44-0C01-11D5-8E83-0010B541CD80}")

Dim oContext As TranslationContext 

oContext  = ThisApplication.TransientObjects.CreateTranslationContext() 

Dim oIgesMap As NameValueMap 

oIgesMap = ThisApplication.TransientObjects.CreateNameValueMap()

oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism


 

Trace.TraceInformation("Iges: create data medium")

Dim oData As DataMedium 

oData = ThisApplication.TransientObjects.CreateDataMedium()

oData.FileName = "C:\temp\export.igs"

oIgesMap.Add("GeometryType", 1)


 

'Export to IGS

oIges.SaveCopyAs(oPart, oContext, oIgesMap, oData)

This doesnt follow my requirements since I need that:
-  The images and igs stay with the same file name as member name/part name of the source .ipt.

-  The images and igs stay in the same folder as the source .ipt.

-  And the ability to set a specific resolution to the exported images.

 

Any help? I've tried changing the code, and generating my own and still I've only met errors.

 

Thank you

0 Likes
394 Views
0 Replies
Replies (0)