Hey guys,
i've been experimenting with the file saving/exporting options, but i've got no clue how i can access the options hidden in the DXF export options dialog.
I found this in the api, but it doesn't seem to be available: https://community.coreldraw.com/sdk/api/draw/20/c/dxfexport
It also seems there's a way to create an ExportFilter of sorts that should be able to set the required version, but i can't figure that part out.
Can someone help me with this?
Thanks in advance!
Thanks FaneDuru.
I'm using 2019 64bit, sadly my 2018 version has some trouble installing addons (i suspect it's cause it's a 32 bit version that i'm running on a 64bit system), however i also should have a X7 Version that i could install and try it with.
Anyway, i repeated all steps as you instructed but i'm still getting the error that the file can't be referenced when trying to add it.
Sorry for the language... should've installed it in english. ^^
It looks they 'improved' it...
X8 allows referencing of this file type as I explained. X6 does the referencing operation in the same way. Just tested. The reference name shows 'FilterDXFLib'...
No problem with your German interface. Some time before I learned a little German...
And anyhow, English is not my native language, too.
In this case I do not imagine how you can solve the problem. I do not have 2019 installed to try something by myself. Please check if your installation does not also have .dll or some other compatible file (.olb, tlb). Maybe they did that since 2019 version does not allow such a type referencing. In the link I firstly suggest they were speaking about .dll. I did that 'trick' because I did not have such an option, not .dll existing in that location. I would suggest you to try finding all files (in Corel Installation Folder) named IEDXF. Maybe you are lucky and find a .dll able to be referenced in C#, too.
Hmm, i think we got it wrong... i experimented a bit and it seems that using ExportFilter applies to all available kinds. Using this actually exported my file with the right version:
Public Sub Export()Dim filterObject As ExportFilterSet filterObject = ActiveDocument.ExportEx("testr11.dxf", cdrDXF)With filterObject.Version = 6.FinishEnd WithEnd SubNow i just need to figure out how to call that macro from a C# addon, or even better, somehow do that in C# itself. xD
Sadly there's no way to access the Version property in C#. (Or at least i didn't find one)
I am afraid it is not possible to obtain the export (CAD) Version without having the right reference to that filter...
For instance, I can see the specific export Dialog (in VBA after correct referencing), I can change/set the Export Version (manually or programmaticaly) and than collect it in Immediate window...
After editing:
I was wrong...
I tested your code (in VBA) and even if the global filter looks to not having any Version property (just writing a dot in With - End With iteration), putting .ShowDialog, it shows the DXF export options and for Version 6 it is AutoCAD R9...
Ya, multiple Versions work for my purposes, just not the default one. Just tested it showing the dialog, seems Version 4 is actually AutoCad R11.
Still leaves me with the issue that i need to call that macro from a C# addon or somehow do that in C# itself. :D Maybe Former Member has an idea?
Thanks guys!