PDA

View Full Version : Corel 12 Question



mike klein
12-03-2005, 11:04 AM
Does anyone know of a function in Corel which allows a person to automatically enter sequential numbers...

What I have are over 2000 items which have a companys logo engraved onto one side and on the other side there will be 3 digit and 4 digit numbers starting out at 100, then 101,102,103,104 and so on. I used the laser to cut out the template for their items, set up a paragragh text block on each item with the number 9999 in every item. The only shortcut I can find so far is to search and replace. I was hoping their may be a function in Corel where as a person could select a bunch of text blocks and re-number them sequentially, Automatically.

Mike

Bruce Volden
12-03-2005, 2:23 PM
Mike


I also do some serialization - on custom knives. I run Corel 11 and haven't found a "sequence" for numbering. I'll be following this thread for info though!! I'm sure a macro could be programmed for this feature but am not a tech person.


Bruce

Joe Pelonio
12-03-2005, 2:47 PM
I'm not sure about this, but I do remember seeing a lot of add-on packages and vinyl plotter cutting software for Corel that advertises that they can do sequential numbering which Corel cannot do. Here's one of the add-ons:

http://www.hard-soft.co.yu/html/help-pmn.htm

I have not used any of these, that one hasn't come up yet.

Lee DeRaud
12-03-2005, 2:48 PM
Right answer is probably a VBA program to step through the list of selected objects, ignore those that aren't paragraph text, and replace the '9999' (or other marker) with a value, which then gets incremented. (Possibly using the number from the first object as the starting value.)

Lee DeRaud
12-03-2005, 2:54 PM
I'm not sure about this, but I do remember seeing a lot of add-on packages and vinyl plotter cutting software for Corel that advertises that they can do sequential numbering which Corel cannot do. Here's one of the add-ons:

http://www.hard-soft.co.yu/html/help-pmn.htm

I have not used any of these, that one hasn't come up yet.(looks at description of program) Oh, duh, stupid me: Corel 12 already has a 'Print Merge' function, you just need to create the file of numbers to stuff in...and that's all that program does. But despite what that program claims, generating that file is trivial: just use Excel.

Shaddy Dedmore
12-03-2005, 4:21 PM
There's a couple step process here, but this is some VBA that will increase a text box.

I've saved my code as a GMS file, so you should extract it to Program Files\Corel\Draw\GMS or wherever your other GMS files are.

EDIT: to run the code, TOOLS==VISUAL BASIC==PLAY then choose "Serial Increment" in the "Macros In" box then choose the macro, then click Run.

First, the serial number text box that you create must be Renamed "Serial". I find it's easiet to do it in the Object Manager window on the first one, than as you copy and paste it it retains the name "Serial". I've also included in my GMS a macro that will change the name of everything you've selected (so make sure if you run it, only the text boxes you want to increment are selected). It's called "RenameTextboxToSerial".

(The reason for renaming to Serial is so in the future when you want to change the count, you can easily programmatically pick out the right box to change withough individually selecting by hand)

The other macro "AutoIncreaseSerial", will pick out the Serial text boxes and increment them from your selection. I made it so you have to select them, so if there are some you want to leave alone, you can leave them unselected and it won't increment them (useful if you want say 0-10 with one saying, then 0-10 again with another saying). But if you're doing all of them on you page, you can select everything on that page (including pictures, lines, curves, everything) and it will pick out only the "Serial" boxes. I'm sure I've made it sound harder than it really is. It's not so bad.

There are 2 input boxes, the first asks for the start number (usually starts with 1, but enter whatever number you want) the second input box asks for your format, if you want 001,001,003 enter 000 if you want 01,02,03 enter 00.

Let me know where I screwed up hehe. I only have version 12, not sure what else it works in. Here's my code in case the GMS doesn't work.


Sub AutoIncreaseSerial()
Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim s As Shape, vSer As Integer, vFormat As String
vSer = CInt(InputBox("Input Starting Serial Number", "Serial Number Start Box", 1))
vFormat = InputBox("Enter how many digits of resolution using Zeros (0000)", "Format Box", "0000")
For Each s In OrigSelection
If s.ObjectData("Name").Value = "Serial" Then
s.Text.Story = Format$(vSer, vFormat)
vSer = vSer + 1
End If
Next s
End Sub



Sub RenameTextboxToSerial()
Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim s As Shape
For Each s In OrigSelection
If s.Type = cdrTextShape Then
s.ObjectData("Name").Value = "Serial"
End If
Next s
End Sub

Shaddy

mike klein
12-03-2005, 5:08 PM
Shaddy...You are a Genius..
The code works perfect. I just renumberd 2000 pieces in less than 15
minutes which would have probably taken 4-5 hrs or more (for me anyway).

Mike

Shaddy Dedmore
12-04-2005, 4:21 AM
That's great. I guess it's OK that it took me longer to type up the post than is did for you to implement it. ;)

I haven't used Corel all that long (about 1.5 years), but I've been using VBA (Visual Basic 6, excel, access) for years. So it's usually what I resort to when trying to do new stuff. Especially repetitive things. I tend to miss features within Corel doing that though. These forums are a huge learning tool.

Shaddy

Roy Brewer
12-06-2005, 12:49 AM
<!--StartFragment -->

I was hoping their may be a function in Corel where as a person could select a bunch of text blocks and re-number them sequentially, Automatically.

Mike,

It could, of course, be that I didn't understand, but I can't imagine why you wouldn't use Corel's Print Merge with Incremental field data. I do understand that this would not be feasible if you already have your layout created with several instances spread out across your page. But, the combined power of Print Merge's ifd and the Print dialog's Imposition layout make the entire process super efficient.

Yes, you could import from Excel, but why? You must tell it where to start and where to stop and format somewhere; why not do it in CorelDRAW?

It's the Imposition Layout that gives Corel the advantage. Create one instance of your object, and create/save an Imposition Layout(from Print dialog) that replicates it across & down and feed your print merge file into that Imposition layout. This same Imposition Layout would almost always be used to cut your jigs in advance of the actual engraving.

EngravePro, EngraveLab and SmartDesigns all have excellent, professional programs that do more than just serialize; but for what I believe you are describing, I'd use *straight* CorelDRAW. [RE: Corel 10-12 only --- I can't tell that there are any differences in Print Merge since 10.] Especially if I had additional variable fields, I'd use the combination of Print Merge and Imposition Layout.

If anyone is interested in a copy of the article I wrote for ARA a few years ago detailing this, remove all Zs from following email address and she'll email you a copy.

zjeanetteZ@zbrewersales.com (zjeanetteZ@zbrewersales.com)

P.S. A few "gotchas" that might save you some aggravation:
1. Uncheck the autoincrement (or explain to me how it works)
2. Enter START number and END number + 1 ; that is if you want the first knife to be 1 and the last knife to be 2000 then enter 1 and 2001 (I don't know why, it just works that way).
3. If you use Excel to create your data file, be sure to save as TAB delimited .TXT file. Also, close the file in Excel before trying to "Open Existing File" in Print Merge.
4. Cruel of me to put this last, but while Corel does a great job of bringing in multiple columns from Excel into Print Merge --- I don't know how to get it to bring in a single column; hence, another reason I'd increment in Corel.

mike klein
12-06-2005, 6:56 AM
Roy,

I will keep that in mind and look into it when I get some extra time here. I been using Corel for quite some time and still learning more and more features about it. I don't think a person can ever realize the potential of some of these programs out there.

I did use the method mentioned by Shaddy and it worked perfect for me for the current project we have, not to say there are not other ways of accomplishing the task.

Mike