braynpower
New member
Hello,
So I am pulling my hairs out at the minute as I am incapable of getting my export command to work. I have copied and pasted methods from wherever I can find them... Thing is, nothing works, and there really isnt much information out there. Anyway, I have pasted a bit of my script below... basically, there is a syntax error, or an unset variable... God only knows...
The documentation says I have to call the 'Is x supported' things before making the export command, so I try do that... not sure I have that bit right either. Im taking pot shots in the dark here...
Is there a CREO VBA API mastermind out there who could lend me a hand? This is one of the final hurdles I am facing (there are a couple of other ones too... but hey, baby steps), and If I can get this to work, I would happily buy whoever works it out a beer!
Dim ICS As Boolean
Dim IGRS As Boolean
Dim GeoFlag As IpfcGeometryFlags
Dim Step3D As IpfcSTEP3DExportInstructions
Dim Export3D As IpfcExport3DInstructions
Dim Export As IpfcExportInstructions
Set GeoFlag = New CCpfcGeometryFlags
ICS = session.IsConfigurationSupported(EpfcExportType.EpfcEXPORT_STEP, EpfcAssemblyConfiguration.EpfcEXPORT_ASM_FLAT_FILE)
IGRS = session.IsGeometryRepSupported(EpfcExportType.EpfcEXPORT_STEP, GeoFlag)
GeoFlag.AsSolids = True
Set Step3D = New CCpfcSTEP3DExportInstructions
Set Export3D = Step3D
Set Export = Export3D
Model1.Export ("D:\AJBS\Script_Test\JBA_TEST.stp", export)
So I am pulling my hairs out at the minute as I am incapable of getting my export command to work. I have copied and pasted methods from wherever I can find them... Thing is, nothing works, and there really isnt much information out there. Anyway, I have pasted a bit of my script below... basically, there is a syntax error, or an unset variable... God only knows...
The documentation says I have to call the 'Is x supported' things before making the export command, so I try do that... not sure I have that bit right either. Im taking pot shots in the dark here...
Is there a CREO VBA API mastermind out there who could lend me a hand? This is one of the final hurdles I am facing (there are a couple of other ones too... but hey, baby steps), and If I can get this to work, I would happily buy whoever works it out a beer!
Dim ICS As Boolean
Dim IGRS As Boolean
Dim GeoFlag As IpfcGeometryFlags
Dim Step3D As IpfcSTEP3DExportInstructions
Dim Export3D As IpfcExport3DInstructions
Dim Export As IpfcExportInstructions
Set GeoFlag = New CCpfcGeometryFlags
ICS = session.IsConfigurationSupported(EpfcExportType.EpfcEXPORT_STEP, EpfcAssemblyConfiguration.EpfcEXPORT_ASM_FLAT_FILE)
IGRS = session.IsGeometryRepSupported(EpfcExportType.EpfcEXPORT_STEP, GeoFlag)
GeoFlag.AsSolids = True
Set Step3D = New CCpfcSTEP3DExportInstructions
Set Export3D = Step3D
Set Export = Export3D
Model1.Export ("D:\AJBS\Script_Test\JBA_TEST.stp", export)