View Single Post
  #4  
Old 31-01-2006, 09:10
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Steve,

I haven't tried the File Name Inserter yet (need to install it) but I did a quick test in CorelDRAW 12 and X3 and it seems to work the same way. Here are the sample code for v12:

Code:
Sub Test12()
    Dim x As Double, y As Double
    Dim txtSize As Double
    txtSize = 24
    x = ActivePage.SizeWidth / 2
    y = ActivePage.SizeHeight - ActiveDocument.ToUnits(txtSize, cdrPoint)
    ActiveLayer.CreateArtisticText x, y, "Text", Font:="Arial", _
                    Size:=txtSize, Alignment:=cdrCenterAlignment
End Sub
and X3:

Code:
Sub TestX3()
    Dim x As Double, y As Double
    Dim txtSize As Double
    txtSize = 24
    x = ActivePage.CenterX
    y = ActivePage.TopY - ActiveDocument.ToUnits(txtSize, cdrPoint)
    ActiveLayer.CreateArtisticText x, y, "Text", Font:="Arial", _
                    Size:=txtSize, Alignment:=cdrCenterAlignment
End Sub
The result is absolutely identical.

What am I doing differently?
Reply With Quote