Dears
How should I do to export a 3D model to a step file?
At first I create a new 3D part model in the pro/e
Then,the code I try is following
Dim aC As IpfcAsyncConnection
Dim model As IpfcModel
Dim step3D As IpfcSTEP3DExportInstructions
Dim export3d As IpfcExport3DInstructions
Dim export As IpfcExportInstructions
Dim session As IpfcBaseSession
aC = (New CCpfcAsyncConnection).Connect("", "", ".", 5)
model = aC.session.CurrentModel
session = aC.Session
Dim tc As Boolean
Dim tg As Boolean
tc = session.IsConfigurationSupported(EpfcExportType.EpfcEXPORT_S TEP, EpfcAssemblyConfiguration.EpfcEXPORT_ASM_FLAT_FILE)
tg = session.IsGeometryRepSupported(EpfcExportType.EpfcEXPORT_STE P, (New CCpfcGeometryFlags).Create())
MsgBox(tc)
MsgBox(tg)
step3D = (New CCpfcSTEP3DExportInstructions).Create(EpfcAssemblyConfigurat ion.EpfcEXPORT_ASM_FLAT_FILE, (New CCpfcGeometryFlags).Create())
export3d = step3D
export = export3d
model.Export("D:\test\test01.stp", step3D)
But there is a exception in last row--pfcExceptions::XToolkitBadInputs
And the msgbox
MsgBox(tc)
MsgBox(tg)
both return false
how to solve tthis problem?
How should I do to export a 3D model to a step file?
At first I create a new 3D part model in the pro/e
Then,the code I try is following
Dim aC As IpfcAsyncConnection
Dim model As IpfcModel
Dim step3D As IpfcSTEP3DExportInstructions
Dim export3d As IpfcExport3DInstructions
Dim export As IpfcExportInstructions
Dim session As IpfcBaseSession
aC = (New CCpfcAsyncConnection).Connect("", "", ".", 5)
model = aC.session.CurrentModel
session = aC.Session
Dim tc As Boolean
Dim tg As Boolean
tc = session.IsConfigurationSupported(EpfcExportType.EpfcEXPORT_S TEP, EpfcAssemblyConfiguration.EpfcEXPORT_ASM_FLAT_FILE)
tg = session.IsGeometryRepSupported(EpfcExportType.EpfcEXPORT_STE P, (New CCpfcGeometryFlags).Create())
MsgBox(tc)
MsgBox(tg)
step3D = (New CCpfcSTEP3DExportInstructions).Create(EpfcAssemblyConfigurat ion.EpfcEXPORT_ASM_FLAT_FILE, (New CCpfcGeometryFlags).Create())
export3d = step3D
export = export3d
model.Export("D:\test\test01.stp", step3D)
But there is a exception in last row--pfcExceptions::XToolkitBadInputs
And the msgbox
MsgBox(tc)
MsgBox(tg)
both return false
how to solve tthis problem?