OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28-02-2008, 11:31
eldwin
Guest
 
Posts: n/a
Default scaling objects and alignment

I'm sorry if this question seems to have an obvious answer, but I am rather new to the use of visual basic within corel.

I am attempting to assemble a script to resize objects based on percentage scaling.
This seems simple enough with the Stretch command.
My problem is that the Stretch command scales the objects using the top left corner of the object as the reference point, growing/shrinking the object out to the right and downwards.
Because of the varying sizes of the objects I am working with I want to keep the objects centered on their original position prior to their scaling.

How can I do this? Is it possible?
Reply With Quote
  #2  
Old 28-02-2008, 13:23
kliv
Guest
 
Posts: n/a
Default

Very simple I think (even for me, a beginer). Search for help (in VBA for coreldraw) for Document.ReferencePoint. There is an example - simple to understand.
Reply With Quote
  #3  
Old 29-02-2008, 17:32
eldwin
Guest
 
Posts: n/a
Default

I've gone searching through the help for that and found nothing, I have found some information (and examples) in the dvba_pg manual file, and these seem to be leading in the right direction, but still have not solved my problem at all.

How do I rescale an object within a selection, based around the object's center (not the center of the selection of multiple objects?
Reply With Quote
  #4  
Old 29-02-2008, 19:47
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 431
Default

Hi, not sure what you mean - do you want to resize one object in the selection or all of them? Anyway, try putting this at the beginning of your macro:

Code:
ActiveDocument.ReferencePoint = cdrCenter
Hope this helps,

Chris (Hunt)
Reply With Quote
  #5  
Old 01-03-2008, 09:53
kliv
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by eldwin View Post
I've gone searching through the help for that and found nothing, I have found some information (and examples) in the dvba_pg manual file, and these seem to be leading in the right direction, but still have not solved my problem at all.

How do I rescale an object within a selection, based around the object's center (not the center of the selection of multiple objects?
First of all, what knowbodynow sugested is what I had in mind. That's why I said it's simple.
But on your second post you ask something different... and I dont understand the question... Please upload an example, or some code lines.
I don't understand how you didn't find any help on reference point in VBA help... Are you familiar with pressing F1 while cursor is in a command and getting so the help specific for that command? Cause I just tested and if I type referencepoint and press f1 it gives me exactly that...
Reply With Quote
Reply


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
Script to help create a score mark. Inkman Macros/Add-ons 25 23-07-2006 17:57


All times are GMT -5. The time now is 05:30.


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