I originally posted accidentally under "Corel Connect", instead of "Corel Draw X7." My apologies for any confusion.
I make sales drawings for a manufacturer. In these drawings I show both metric and imperial measurements. Example: 27' 8" [8433]. [ ] brackets are the metric conversion. What I normally do is use a conversion calculator someone made in Excel. I type the distance in Excel, then type the answer in CoreI. I would prefer it if Corel Draw could just do it. Maybe inside the tables tools, and I can hide the border lines. So as I type the distance in feet and inches, Corel will automatically insert the correct converted metric distance. I tried this with importing a table from Excel into Corel. It did sometimes work, but would Crash Corel constantly. I use Corel Draw Graphics suite X7. Drawings are not to scale, so measurements would be typed in.
I wrote a little macro for this.
User enters feet and inches (types them in or uses the drop-downs in the comboboxes).
Press the button, and the macro puts together the text string, displays it in the form, and copies it to the clipboard.
Here's the .GMS file:
(Deleted; look further down the thread to find a newer version.)
Save
It worked until I tried 15' 3". It converted 15' 10", which is not what I typed. I typed 14' 3" and it worked. So I went back to 15' 3", and it wouldn't calculate. i HAVE BEEN USING THIS TO GREAT APPROVAL! I ran across another measurement that "hiccuped" 30 foot 5 inch calculates as 30 foot 1 inch. With the exception of the glitches, you have done a marvelous job. I select text, then punch in the numbers, and the just hit past on the selected text. I only need to type once. The only edit, but not necessary, is that inside the brackets it is understood to be metric. I don't need the "mm" to be displayed.
OK, something was really messed up in that previous macro! I think the problem has been fixed in this version:
feetinches_mm(3).gms
In addition to fixing the wacky behavior, I also made a couple of changes to the way the userform works.
If I were using this, I'd be using the tab key. Type in feet, tab, type in inches, tab, hit the Enter key on the numeric keypad (or use the spacebar) to press the button. Tab again, and it's back in the feet box, ready to type in the next one.
Mostly it is from marked up drawings. The only way I can see it being any quicker was if there was a way to pop in a table, with no borders showing. As I type in one cell, the conversion is done in another. I can then place these around the templates I use. Then I wouldn't have to even paste the text and from what you provided. I also wouldn't need to adjust font size. Just type what I am given and move on. I mainly only get the feet and inches.
Based on the way it sounds to me that you typically expect to be using this, I added another button. The new button directly creates a new artistic text object. The macro is set to create it at the lower LH corner of the page, but that could easily be changed to another location if you prefer.
The text created uses the current default settings for artistic text objects.
The two buttons work independently of each other. So, you don't need to click the "Create Text String..." button in order to create the artistic text object.
GMS file:
feetinches_mm(6).gms
Note that this version (6) was uploaded 2017-01-19. The only change is that one of the variables was changed from integer to long.
Screenshot:
This is just cool. Dude, you are awesomer than before! Works beautifully.