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 21-03-2010, 14:30
vrata
Guest
 
Posts: n/a
Red face Find objects coordinates

Hello, I need your help as soon as possible I have a lot of circles in canvas. I want to find coordinates of the centers and get them into an array.
Reply With Quote
  #2  
Old 21-03-2010, 14:37
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
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 Centers

You can get the centers like this, then read them into your array:
Code:
Sub GetCenters()
    Dim x As Double, y As Double
    Dim s As Shape

    ActiveDocument.ReferencePoint = cdrCenter

    For Each s In ActivePage.Shapes
        s.GetPosition x, y
    Next s
End Sub
Best of luck,

-Shelby
Reply With Quote
  #3  
Old 21-03-2010, 14:56
vrata
Guest
 
Posts: n/a
Default

Thanks a lot. Can you help me with this problem? I want to find coordinates and dimensions of the circles too. Then I want to replace every circle with another object (only one type - the same object) with the same dimensions as the circles.
Reply With Quote
  #4  
Old 21-03-2010, 15:29
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
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 Replace Shapes

There is already an example of how to replace shapes posted, you can take a look here:

Replace shape with another shape

-Shelby
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
Find and delete objects with no fill or outline keytecstaff CorelDRAW/Corel DESIGNER VBA 17 22-06-2010 23:34
Measurements / X Y Coordinates jfelder General 7 10-07-2009 09:16
Shape Coordinates jess916 Macros/Add-ons 9 08-07-2009 12:26
How to find centers of objects vratis CorelDRAW/Corel DESIGNER VBA 1 06-01-2009 23:54
Find objects by properties Webster CorelDRAW/Corel DESIGNER VBA 8 01-12-2004 18:51


All times are GMT -5. The time now is 16:49.


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