We need a Macro for CorelDraw X8 (or X6) that will export to an XML file defining 2 lines of text and the coordinates of each character on the page. The page is 4" x 2" and the text will be located in the lower third of the page. The Fonts are (Arial and Arial Narrow 18 point). This is for iStamp software that drives a foil letter stamping machine.
iStamp sent us the attached PDF file to use as a guide.
This is a paid project.
PDF
OK. The idea was to send a cdr file (sent) accompanied by the wished XML. In order to compare what I understood from your specification with reality on the battle field... If not possible let's try to better define the project them:
All x, y references depends on the page size. Will the foil be stamped on a shape having exactly the corel page dimensions? At least does it have the same left and bottom references? If Yes, this part of the solution is clear and not so complicate. If not, is it a scale to be taken in consideration when XML is issued? I just suppose that the material to be stamped should be somehow aligned to the bottom of the machine and the left (or right) size. This is very important to be settled... For instance I work on a cutting machine without OPOS and I am aligning the curve to be cut in the file at 6 mm above the bottom and at 9 mm to the right side, for defining its starting position.
Is it mandatory the both text lines belonging to the same Artistic Text?
I mean if each line would be a separate Artistic Text the code sample posted by NudeFan returns a XML similar to the one in your pdf...
Please try to answer the rest of my questions. Only knowing what is it about I can start working...
clever subroutine- Why not export as ".html" or ".xml" instead of ".txt" or was it just random?
Since this is no fully usable XML-File (<XML ....> ... </XML> is missing), so .Xml is misleading. It is only a text block ready to be copied into an existing XML-File (maybe with more information).If I would know the entire XML-declaration (was not given in the PDF) I could make it complete, then I would name it .Xml!
The Corel file the same size as the leather tag that will have the foil stamped on it.
The text can be 2 separate lines of artistic text.
The text in the Corel file is positioned where it needs to be stamped on the tag
Thanks again.
So, I suppose that you do not know too much about VBA in order to receive hints to develop your own application and you need a project as professional as possible. If I understood well I have in mind a project as following:
A Corel Docker made in C# having a graphic interface able to initially set the next parameters:
TextBoxes used to input 'account number', 'order number' and the path to a folder where files will be created using a Button and a Browse window. If 'order number' is something created during XML file preparation by increment of the last order, it can be automatically filled based on the last order number kept in a specific file and saved like the last one. If it is done by sales it should be filled manually. If 'account number' is something connected to the client and it is unique, if you are able to export from your ERP a list of client account numbers, it can be searched in that list and chosen by the Order Entry operator. Please confirm if this approach is useful and you are able to provide it. If not, please specify how do you wish to proceed on that issue.
You must define what 'number of tags, tag type code' means and according to that definitions we must settle if they can be defined by code during execution or in a different way. 'Due date' I suppose represents the XML creation date. If not, please specify its meaning. Also if you need also the creation time.
Operator prepares the layout in CorelDRAW page and press a button which basically does the next:
Prepare the XML file and save it in the folder previously selected using the browse window/button. This path will be saved in Registry and next time the docker will be opened it will be filled in the 'Saving Folder Path' text box. The name of the XML file can be created according to a settled algorithm. Maybe the order number. Maybe each month a new folder will be created named like 'current month_current year' and all orders processed in that month will be saved in that directory...
A jpg file (or png/bmp) for the text being processed will also be created (in a sub-folder of the main folder) named according to what we will settle. The same name of the XML file for instance. If this will be good enough in order to rapidly find it, this is OK. Otherwise a new element in XML file will keep the path to that file. We must define how to be named and where in the file to be placed in order not to bother the software processing the file.
If 'number of tags, due date, tag type code' mean something determined during XML processing and also XML file will keep in some places this information, such a way will be followed. If not, you must decide what they mean and how to deliver this information an a convenient way.
This project will be delivered with an installer able to move the necessary files in the appropriate place in order to make Corel opening the docker. During testing period I can deliver files necessary to manually be saved in a specific folder and you will give me the necessary feedback regarding how it works against your needs or you need something else even if it had not been settled from the beginning.
Is that OK with you?
Do you just need some hints and code samples in order to make on your own the necessary application and my initial assumption was wrong?