OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Feature requests/wishlist

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-03-2010, 00:54
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default object spacer macro

Is there a macro which allows you to space objects evenly with a given distance?

-Greg
Reply With Quote
  #2  
Old 08-03-2010, 02:09
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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 Object Spacing Control script

I still here Alex's Object Spacing Control script for this:

http://www.oberonplace.com/draw/draw.../spacingsh.htm

-Shelby
Reply With Quote
  #3  
Old 08-03-2010, 08:32
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

...or this which will also arrange by size if needed and rotate if wanted.
http://www.macromonster.com/index.ph...m_orderby=Code

-John
Reply With Quote
  #4  
Old 08-03-2010, 15:21
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Cool! Thanks guys!

-Greg
Reply With Quote
  #5  
Old 08-03-2010, 17:14
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Quote:
Originally Posted by shelbym View Post
I still here Alex's Object Spacing Control script for this:

http://www.oberonplace.com/draw/draw.../spacingsh.htm

-Shelby
Hi Shelby. Now that I've got this script running, how can I add a feature such as 'apply to selected only'? I now know how to add save.settings so that's not a problem. Thanks in advance/or John if he knows.

-Greg
Reply With Quote
  #6  
Old 08-03-2010, 17:31
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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 Object Spacing Control script

It should work already for the selection.

-Shelby
Reply With Quote
  #7  
Old 08-03-2010, 18:43
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Quote:
Originally Posted by shelbym View Post
It should work already for the selection.

-Shelby
I ran the script and I had a lot of other objects on the page and I selected what I wanted to space so the script went and tried to space everything on the page. Also, if I want to make this into a gms, how would I go about doing this? Thanks again!

*update: The script appears to loop through every object and then disclaims an error "could not apply to all objects" strangely enough. Also, the script will not apply the spacing to all objects unless there are some which are grouped. I test this theory using rectangle shapes and I noticed that it will include grouped rectangles on the page even though I did not select them, just three other separate objects.

-Greg

Last edited by gorgo2; 08-03-2010 at 18:54.
Reply With Quote
  #8  
Old 08-03-2010, 19:53
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

That script is pretty old.
Here's a very simple one that might do what you need:

Code:
Sub space()

Dim s As Shape
Dim sr As ShapeRange
Dim i As Integer
Dim x#, y#, w#, h#
Dim x1#, y1#, w1#, h1#
Dim addup As Double
Dim space As Double

space = 0.5

Set sr = ActiveSelectionRange
sr(1).GetBoundingBox x, y, w, h

ActiveDocument.ReferencePoint = cdrBottomRight

addup = w
For i = 1 To sr.Count
    If i > 1 Then
        sr(i).GetBoundingBox x1, y1, w1, h1
        sr(i).SetPosition x + w1 + addup, y
        addup = addup + w1 + space
    Else
        sr(i).Move -space, 0
    End If
    
Next i

End Sub
-John
Reply With Quote
  #9  
Old 08-03-2010, 21:52
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

That'll do the job John. You know what I'm going to ask next....right? Can you say GUI?

-Greg
Reply With Quote
  #10  
Old 08-03-2010, 22:16
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

...lol

I can point you in the right direction but....

...give it a try.
You can do it.

-John
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
Macro for Object Nesting? excessiveforce New product ideas 9 31-05-2010 00:12
Macro to hide all but the selected object cooloox Macros/Add-ons 2 28-09-2008 21:19
Activate Macro by Dragging and Dropping Object knowbodynow CorelDRAW/Corel DESIGNER VBA 2 09-05-2006 15:03
Need Macro for "Convert Outline to Object" billjones Macros/Add-ons 9 02-03-2006 07:36
How to select object inside another object jukos General 4 24-10-2005 21:27


All times are GMT -5. The time now is 08:29.


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