OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 26-04-2014, 20:21
knowbodynow knowbodynow is offline
Senior Member
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434
Default Keeping Origin bottom left

I have a macro that amongst other things resizes the page and adds some guidelines. I have lots of A5 documents and when I run it on one of them for some reason the origin is changing so that 0 is no longer in the bottom left corner. This hasn't happened to me before. Why would this change on one document and not the others? Is there anything I can add to my macro to force it to keep bottom left the origin for the rulers. I tried:

  ActiveDocument.DrawingOriginX = 0
  ActiveDocument.DrawingOriginY = 0
But it didn't seem to have any effect.
Reply With Quote
Old 27-04-2014, 00:43
knowbodynow knowbodynow is offline
Senior Member
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434

Since when has 0 been the document center? This works but it's a faff:

ActiveDocument.DrawingOriginX = 0 - (ActivePage.SizeWidth / 2)
ActiveDocument.DrawingOriginY = 0 - (ActivePage.SizeHeight / 2)
Was it like this prior to X6, thanks.
Reply With Quote
Old 05-05-2014, 03:44
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4

In VBA, the document origin of (0,0) was always in the center of the page. And the lower left corner as you guessed is (-page_width/2, -page_height/2). Once you set Document.DrawingOriginX/Y, then all the rest of API calls will be relative that point. So maybe that's why you are confused. Since all the methods like Layer.CreateRectangle are normally relative to lower left corner of the page simply because the proper drawing origin is set beforehand...
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Drawing Origin in VBA nic CorelDRAW/Corel DESIGNER VBA 2 30-10-2013 09:04
vba Left not working runflacruiser CorelDRAW/Corel DESIGNER VBA 7 21-05-2010 11:20
Ruler to start top left of page instead of bottom left fungel General 2 08-04-2009 13:07
Color pallet gone from bottom of screen signweld General 1 21-08-2008 15:31
winAPI to capture a left-click? Rick Randall CorelDRAW/Corel DESIGNER VBA 3 24-07-2007 13:38

All times are GMT -5. The time now is 04:02.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com