It's default in my company to use MM for our drawings, and I see that I can set that easily, but I am struggling with how to set the precision to 0 for the Decimal Points.
Private Sub GlobalMacroStorage_DocumentNew(ByVal Doc As Document, ByVal FromTemplate As Boolean, ByVal Template As String, ByVal IncludeGraphics As Boolean) Doc.Unit = cdrMillimeter Doc.Rulers.HUnits = cdrMillimeter Doc.Rulers.VUnits = cdrMillimeter End Sub
I have done some research and found something about SvgDrawingPrecision, but don't understand quite how and where to set this to 0:
zeegee said:It's default in my company to use MM for our drawings, and I see that I can set that easily, but I am struggling with how to set the precision to 0 for the Decimal Points.
If you are referring to the number of decimal places that are displayed in the workspace controls, I think that is not a document property, but an application preference that can be part of the workspace.
There is an Application.SetApplicationPreferenceValue method shown in the API. I've tried using it a few times, but not with much success.
In general, I don't think that you need to change Document.Unit for the sake of anything in CorelDRAW that the users interact with.
People sometimes change Document.unit to a particular unit within a macro so that they can more conveniently "talk" to CorelDRAW using a particular unit. I don't do that; I just convert to/from document units as necessary in my macros.
Gotcha, interesting. I changed that, restarted my Corel, and it still shows 0.00 when I open a new document. I've been researching other ways and not having much luck. I did change it to 0 manually and then clicked Tools > Save Settings as Default. That seems to be working, but hopefully all my settings are the same as the users.
For me, the setting seems to be correctly saved in the workspace; set it to "0", and it is "0" the next time I start CorelDRAW. I have only tried it with "0" a few times, though; I am usually using three decimal places for my work.
I think that "Save Settings as Default" should not have anything to do with the number of decimal places, because that is an application preference, and those are saved automatically in the workspace.
The issue of, "Where do all of the properties and settings come from when a new document is created?" is a complicated one in CorelDRAW. I've tried, but I don't think I understand it completely.
Instead of worrying about saving settings as default for new documents, I now start new documents based on templates. When I do it that way, it's easy to know that I am going to have all of the document properties exactly as I want them to be.
Ugh, I haven't been able to save a response, but yes, templates seem like the way to go, that's a good idea. Thank you for your advice again!