Hello,
I've just purchased the enterprise edition, so I'll have my licence number soon.
I begin working on the demo version, with Delphi 6.
This is a use-case where I don't know exactly how to proceed :
- I use template files created with Dycodoc, which contain some text fields mapped to text boxes, this is OK.
- I need also to add some complex and dynamic drawings to the documents, and I have already written the drawing procedures. They use VPE functions like polyline, polygon...
- My drawing procedures accept the same parameters as writeBox functions, i.e. VFREE constant is allowed.
- I also have the "render" functions, so I can calculate the final coordinates without "printing".
I'd like to define the area "where to draw" in the template file, And it would be great if I could use dynamic sizing for this area. The aim is to have some other template elements dependant from my drawings.
For now I'm able to :
- define the drawing area with a frame in the template, but with static size
- "print" my drawing at the frame position after having dumped the template
I don't know if UDO objects are aimed to this purpose, and nUDOleft, nUDOtop... are not metric coordinates, so I use a frame.
First problem : I can't indicate in the template if my frame has a dynamic size (also impossible with UDO). But I can decide it in my own code, so it is not a big problem.
Second problem : it is too late for modifying the frame size in the template, because I have already dumped it.
I thought I could proceed like this :
- get initial frame coordinates from the template
- "render" my drawing
- modify frame coordinates into the template to adapt its size
- dump the template
- "print" my drawing accordingly to the final place of insertedVpeObject
But I can't, because if I modify the frame coordinates in the template, it will become absolute ! (I hav'nt tried, but I'm quite sure because I don't have access to other properties than nLeft, nRight, nTop, nBottom, so how to define relative coordinates like in dycodoc ?).
Maybe a good solution would be to use UDO, but I would need an event like "onUDORender", to have the possibility to indicate the final size of my drawing. And I'd like to work directly with VPE functions (poligon...) in metric coordinates.
What do you think about it ?
Best regards,
Nicolas.