i am trying to export dwg file via VB API
here is my code:
Dim model As IpfcModel
asyncConnection = (New CCpfcAsyncConnection).Connect(Nothing, Nothing, Nothing, Nothing)
asyncConnection.Session.ChangeDirectory("E:\Export")
model = asyncConnection.Session.CurrentModel
If model Is Nothing Then
Throw New Exception("model not present")
End If
Dim dwginstructions As IpfcDWGSetupExportInstructions
Dim outdir As String
dwginstructions = (New CCpfcDWGSetupExportInstructions).Create()
outdir = asyncConnection.Session.GetCurrentDirectory() + model.InstanceName.ToLower + ".dwg"
model.Export(outdir, dwginstructions)
it can export a dwg file, but it is 9 kb, and it is an Invalid graphics file.
where am i wrong?
could anybody show me another way to do this?