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 30-04-2007, 23:05
norbert_ds
Guest
 
Posts: n/a
Default Move an object

I have an object whose center point I need moved to a predetermined x, y position of a page!

Is this possible?

Regards
Norbert
Reply With Quote
  #2  
Old 30-04-2007, 23:29
norbert_ds
Guest
 
Posts: n/a
Default Urgent

Sorry to be pushing but its rather urgent!
Reply With Quote
  #3  
Old 01-05-2007, 06:55
gingem
Guest
 
Posts: n/a
Default

Just double click on the object and move the center point to where you would like it and then rotate.
Reply With Quote
  #4  
Old 01-05-2007, 10:43
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,778
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Center Via Code

I do believe he is asking how to do this via Code:
Code:
Dim s as Shape
Set s = ActiveLayer.CreateEllipse(5, 5, 7, 6)
s.RotationCenterX = 4
s.RotationCenterY = 5.5
Best of luck,

Shelby
Reply With Quote
  #5  
Old 01-05-2007, 18:35
norbert_ds
Guest
 
Posts: n/a
Default Urgent

Thanks guys but this is not what I was after!

Yes I do need to do it via code but what I wanted was to move an object not rotate it!

I want the to move an object so that its centre point site on a predetermined x, y position of the page.

Sorry to have not made this clear!

Thanks!
Norbert
Reply With Quote
  #6  
Old 01-05-2007, 18:49
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,778
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Move Me

OK you just need to set the reference point then and set the shapes position. Like so:
Code:
Sub MoveMe()
    Dim s As Shape
    Set s = ActiveLayer.CreateEllipse(5, 5, 7, 6)
    ActiveDocument.ReferencePoint = cdrCenter
    s.SetPosition 1, 1
End Sub
Hope I got it right this time,

Shelby
Reply With Quote
  #7  
Old 01-05-2007, 19:58
norbert_ds
Guest
 
Posts: n/a
Default

Thank you Shelby,

This is superb! I thought I would need to do a string of calculations!

Thanks once again!
Sincerely!
Norbert
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
moving an object down in vba sifterbox CorelDRAW/Corel DESIGNER VBA 1 27-04-2006 14:40
Fix Object References in macros JavierDiaz Macros/Add-ons 2 19-12-2005 07:32
Background to object Fine! But Object to Background - How? marian General 2 15-07-2005 03:51
Bounding lines around an object toy4mud CorelDRAW CS 2 04-11-2004 11:56
Would you miss CorelScript object? Alex CorelDRAW/Corel DESIGNER VBA 32 04-02-2004 14:59


All times are GMT -5. The time now is 19:44.


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