OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-08-2005, 00:38
petig
Guest
 
Posts: n/a
Default Rulers, Nudge's prop from VBA?

Is the nudge enable from VBA anyway? The Macro recorder didn't help, and I could not find in help also, just rulers with V/Hunit, not the propertis, like nudge and it's multiplation and devide factor. But I need these...
Reply With Quote
  #2  
Old 11-08-2005, 18:42
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default nudge properties

I don't believe this is currently possible with VBA. Sorry :-(

Shelby
Reply With Quote
  #3  
Old 20-08-2005, 22:15
petig
Guest
 
Posts: n/a
Default

Thanks. In this case I must belive in next versions...
Reply With Quote
  #4  
Old 22-08-2005, 19:43
petig
Guest
 
Posts: n/a
Default error with rulers in VBA...

Version 11, this and some similar line cause an error, frozen CDraw with errormessage Condition #5002-UNITS-1670:

Application.Rulers.HUnit = cdrPica

If I set the ruler "by hand", the query reply 0 (= cdrTenthMicron by vba help) instead of 12. Repared in higher version?

And, if we are here, what size and wich kind the cdrAgate and cdrTenthMicron? What for, if not available from user interface? And what is Q and H (unit)? -- I didn't find anything in help or elsewhere.
Reply With Quote
  #5  
Old 22-09-2005, 21:11
petig
Guest
 
Posts: n/a
Default Convert units?

There is any other posibilities than CorelScriptTools.LengthConvert to convert a mesured value to another, for example 148.589135498735 mm to cicero? Or if not, what means 1 to 7 in place FromUnit and ToUnit parameters? I think 1 = inch, 2 = centimeters, 3 = points, but what the others exactly? And how to handle the other 9 (?) units?
Reply With Quote
  #6  
Old 22-09-2005, 23:41
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Quote:
Originally Posted by petig
Version 11, this and some similar line cause an error, frozen CDraw with errormessage Condition #5002-UNITS-1670:

Application.Rulers.HUnit = cdrPica

If I set the ruler "by hand", the query reply 0 (= cdrTenthMicron by vba help) instead of 12. Repared in higher version?
No, still appears to be a problem in Draw 12... Will have to log this as a bug.

Quote:
And, if we are here, what size and wich kind the cdrAgate and cdrTenthMicron? What for, if not available from user interface? And what is Q and H (unit)? -- I didn't find anything in help or elsewhere.
cdrTenthMicron is the internal units in CorelDRAW. Inside, everything is measured in tenths of microns. So 1 unit = 1/10 micron. 1 mm = 10000 of these units.

Agate (or agate line) is a traditional printing unit which equals to 1/14th of an inch. Its name comes from the traditional type size called agate, which sets approximately 14 lines to the inch. This unit is still sometimes used in newspaper advertising, where an agate line is one column wide and 1/14" high.

As for Q and H units, if I remember correctly these are used in metric font sizes (specifically in Japan). Frankly I don't know the difference but Q and H equal to 1/4 mm, so 12H font is 3 mm high (~8.5pt).

If you want to read a bit about various measurement systems used in typography, you can do so here: http://www.oberonplace.com/dtp/fonts/point.htm

Quote:
There is any other posibilities than CorelScriptTools.LengthConvert to convert a mesured value to another, for example 148.589135498735 mm to cicero? Or if not, what means 1 to 7 in place FromUnit and ToUnit parameters? I think 1 = inch, 2 = centimeters, 3 = points, but what the others exactly? And how to handle the other 9 (?) units?
In CorelDRAW 12 there are a few unit conversion methods added to VBA object model:
  • Application.ConvertUnits - converts a value between any two units
  • Document.ToUnits - converts any unit into the current document units (as specified by Document.Unit property)
  • Document.FromUnits - converts a value from the current document units into the given unit

For example:

Code:
Application.ConvertUnits(12, cdrMillimeter, cdrPoint)
This will convert 12 millimeters into points.

It looks like you are still with Draw 11, so using CorelScript is your easiest solution. The unit values for this method are as follows:
  • 1 - inches
  • 2 - centimeters
  • 3 - points
  • 4 - Ciceros
  • 5 - didots
  • 6 - picas
  • 7 - tenths of a micron

I hope this helps
Reply With Quote
  #7  
Old 23-09-2005, 00:48
petig
Guest
 
Posts: n/a
Default

Yes, helps a lot! Thanks for the quick and detailed answer. Maybe on next week I'll post a gms, a little game about basic geometry. Ah ok, not so scientific, it's just sizing evenly the selected shapes...

Quote:
It looks like you are still with Draw 11...
Yes, you're right. I think I'll wait CDR 13, hoping that extended features of my interest and nearly whithout bugs :-)
But one more question. These makros (from 11) will be usable in 12 or higher versions?
Reply With Quote
  #8  
Old 23-09-2005, 08:01
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Quote:
Originally Posted by petig
I think I'll wait CDR 13, hoping that extended features of my interest and nearly whithout bugs :-)
Do you have any specific issues in mind? Also what other features you are hoping to get in Draw 13?

Quote:
These makros (from 11) will be usable in 12 or higher versions?
Yes, the same GMS from Draw 11 will work in v12/13.
Reply With Quote
  #9  
Old 24-09-2005, 15:33
petig
Guest
 
Posts: n/a
Default

I'm not a CorelDRAW expert, maybe, my wishes are reality now, just I didn't find the way. I wait just tinie things, but maybe, to much to here, and the 13 whislist is better place to write them. So I try to collect and write them with correct english, or make some codes to clear up what I mean.
Reply With Quote
  #10  
Old 26-09-2005, 10:34
petig
Guest
 
Posts: n/a
Default Termal winds...

First I asked that unitconversion on another forum where said it's work fine, the only error is that works only with the 17 unit of CDR and doesn't convert Celsius to Fahrenheit, but... now its over :-) Here is a little gms what does. It converts 8 temperature units, like kelvin, Celsius, Fahrenheit and others. So, lets make multinational weather reports with cdr!

And, one of my wishes: would be nice in next cdr, if anyway vba were support controlarray...
Attached Files
File Type: zip Temperature.zip (21.1 KB, 396 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to begin with CorelDRAW and VBA shelbym CorelDRAW/Corel DESIGNER VBA 2 03-04-2007 09:15
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
CD 10, VBA not returning true outline width Webster CorelDRAW/Corel DESIGNER VBA 1 24-11-2004 17:09
VBA does not work with my CD 10 ! jobar CorelDRAW/Corel DESIGNER VBA 1 24-08-2003 12:38
Detect if VBA is installed (an answer and a question) reanan CorelDRAW/Corel DESIGNER VBA 3 04-12-2002 14:35


All times are GMT -5. The time now is 14:49.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com