https://chat.openai.com/chat
Here is a sample module for drawing a box with dimensions of 100mm by 400mm in CorelDRAW:
Sub DrawBox() 'Declare variables Dim boxHeight As Double Dim boxWidth As Double 'Set the height and width of the box boxHeight = 100 boxWidth = 400 'Create a new document Dim doc As Document Set doc = Application.CreateDocument 'Activate the document doc.Activate 'Turn off the snap to grid feature Application.SnapToGrid = False 'Turn off the snap to guides feature Application.SnapToGuides = False 'Turn off the snap to shapes feature Application.SnapToShapes = False 'Turn off the snap to points feature Application.SnapToPoints = False 'Turn off the snap to intersections feature Application.SnapToIntersections = False 'Turn off the snap to smart guides feature Application.SnapToSmartGuides = False 'Create a new rectangle Dim rect As Shape Set rect = doc.ActivePage.CreateRectangle(0, 0, boxWidth, boxHeight) 'Set the outline color to black rect.Outline.Color.RGB = RGB(0, 0, 0) 'Set the outline width to 0.25mm rect.Outline.Width = 0.25 'Set the fill color to white rect.Fill.Color.RGB = RGB(255, 255, 255) 'Deselect the rectangle rect.Deselect End Sub
I can't get that code to run in CorelDRAW 2017 so I ran your prompt and oddly enough, it gave me a very short bit of code that did work..
Sub DrawBox()Dim objRectangle As ShapeSet objRectangle = ActiveLayer.CreateRectangle(100, 100, 100 + 400, 100 + 100)End Sub
Gezz I hate website that don't follow standards LIKE THIS ONE.
Just wrote a long reply then thought I'd check what I was saying and control clicked my link at the top for a new tab and lost the page.
There's a bit to say here but I'm not up for typing it again tonight.
Short version is ask it to write code that could be done in more that one way, If/else or for as example.
I suspect the better the pseudo code you input the better the output.