Perhaps I just am horrible at searching, but I can't seem to find any docs on the full CorelDraw API. For example, if I record a macro to export an AI file, I see calls to ActiveDocument and ExportFilter:
Dim expflt As ExportFilter
Set expflt = ActiveDocument.ExportEx("ExportTest001.ai", cdrAI, cdrAllPages, expopt)
Yes, I can not find one entry in the API docs linked from this area:
I can't find ANY info at all about an object named ActiveDocument and the info provided for ExportFilter is woefully incomplete:
I see nothing that documents all the various properties that the macro recorder seems to know about:
With expflt .Version = 10 ' FilterAILib.aiVersionCS6 .TextAsCurves = False .PreserveTransparency = True .ConvertSpotColors = False .SimulateOutlines = False .SimulateFills = False .IncludePlacedImages = True .IncludePreview = True .EmbedColorProfile = True .Finish End With
.Version = 10 ' FilterAILib.aiVersionCS6
.TextAsCurves = False
.PreserveTransparency = True
.ConvertSpotColors = False
.SimulateOutlines = False
.SimulateFills = False
.IncludePlacedImages = True
.IncludePreview = True
.EmbedColorProfile = True
Am I missing something? Or is this really all there is?
It often feels like the scripting capabilities are like a nice bonus on top of CorelDRAW. Amazing capabilities once you learn them a bit, but oftentimes lacking documentation. But in this case it's basically what you see is what you get - recording a macro of an export action pretty much shows you all the options you could have since they basically mirror the settings in the export window. If nothing else you can record while exporting something and changing settings and figure it out.Also, not quite for this topic, but in general, in addition to the docs and discussions here, https://forum.oberonplace.com/index.php is a really useful resource.
I find that the old Help file is much more useful for finding examples of how something works. Not to mention it is much faster for searching. So a quick example, if I search for ExportFilter here is one section it finds:
And here is one item you find when searching ActiveDocument:
Which you can see is "As Document", so if you click on Document you can then get all the Properties, Method and Events.
Here is a link to a zip file that you can download the old help file:
CorelDRAW Object Model
While both of those are definitely useful, they're still not actual API Docs. And while I agree having scripting is nice, as with any professionally developed application I would pay for, I expect that if you offer a feature, you will fully support it. If you are going to provide an API, you have to document it. That's just good development practice in general...
I guess I will have to wait and see how the Mac version grows. Maybe they'll get really savvy and provide a proper Python API...
Sadly, I know. I would love to be able to run all our production apps natively. Alas, without the ability to integrate our current toolset to the degree we can in Corel, it's kind useless to us.
As for why they went with JS instead of Python, I have no idea what thought process was going on there.