OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 02-04-2010, 14:29
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

You guys are awesome man!
I tried it and it works......but
It takes a bit longer and the 900 objects to be deleted flicker for at least 1minute and 20 seconds. Is there something that needs streamlining??

We're almost there man!

Last edited by gorgo2; 02-04-2010 at 15:21.
Reply With Quote
  #12  
Old 02-04-2010, 21:18
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Just uncomment the optimization lines...

-John
Reply With Quote
  #13  
Old 18-04-2010, 23:27
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

Quote:
Originally Posted by runflacruiser View Post
Hi.
Just uncomment the optimization lines...

-John
I'm embarrased to say this but...I did not know what and how to uncomment so I looked it up and I deleted them quote thingies and tested the macro with success. Although it seemed that even when the progress bar finished, the macro was still running/processing and this was tested with about 1,200 small objects. All in all, I like it John and thanks to you and all that helped.

-Greg
Reply With Quote
  #14  
Old 19-04-2010, 13:44
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 Progressbar

That is because he used (n Mod 10) to advance the progressbar, which would mean at 1000 shapes you would reach 100% of the progressbar.

****Ooops my bad, I was looking at Alex's Example*****

John actually advances the progressbar on every shape, so it would reach 100% after 100 shapes. I need to look a little closer next time.

-Shelby

Last edited by shelbym; 19-04-2010 at 13:47. Reason: Johns Code, not Alex
Reply With Quote
  #15  
Old 19-04-2010, 17:10
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Interesting....thanks Shelby!

-Greg
Reply With Quote
  #16  
Old 19-04-2010, 21:58
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

soo....was thinking about what you said and I have to ask...how does one set the progress bar to go through 5oo objects to show 100%?

-Greg
Reply With Quote
  #17  
Old 19-04-2010, 22:37
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 Progressbar

If you know there are going to be exactly 500 shapes, you could use.
Code:
If (n Mod 5) = 0 Then
     stat.UpdateProgress
     If stat.Aborted Then Exit For
End If
This way for every 5th shape it would advance the progressbar 1 ending at 100 or 100%

-Shelby
Reply With Quote
  #18  
Old 05-05-2010, 18:50
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Quote:
Originally Posted by shelbym View Post
If you know there are going to be exactly 500 shapes, you could use.
Code:
If (n Mod 5) = 0 Then
     stat.UpdateProgress
     If stat.Aborted Then Exit For
End If
This way for every 5th shape it would advance the progressbar 1 ending at 100 or 100%

-Shelby
So I would need to make code that counts each object and then builds the progress bar accordingly if I want it to show a more precise status for any number of objects. Is that correct? I wonder how I can do this....
Reply With Quote
  #19  
Old 05-05-2010, 19:27
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 Count

That is correct. Here is a simple example to count all the ellipses in your document.
Code:
Sub CountEllipseShape() 
 Dim sr As ShapeRange 
 Set sr = ActivePage.FindShapes(Type:=cdrEllipseShape) 
 MsgBox "There are " & sr.Count & " ellipse(s) on the current page" 
End Sub
-Shelby
Reply With Quote
  #20  
Old 05-05-2010, 19:27
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 Count

That is correct. Here is a simple example to count all the ellipses in your document.
Code:
Sub CountEllipseShape() 
     Dim sr As ShapeRange 

     Set sr = ActivePage.FindShapes(Type:=cdrEllipseShape) 
     MsgBox "There are " & sr.Count & " ellipse(s) on the current page" 
End Sub
-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
Global Macro delete Michael Cervantes CorelDRAW/Corel DESIGNER VBA 17 16-11-2010 08:11
Find and delete objects with no fill or outline keytecstaff CorelDRAW/Corel DESIGNER VBA 17 22-06-2010 23:34
Delete Segment macro addendum request Rakker New product ideas 1 18-10-2008 15:47
Delete matching objects click101 CorelDRAW/Corel DESIGNER VBA 2 02-06-2008 16:14
Delete small objects macro Jeff Harrison New product ideas 3 19-05-2007 12:19


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


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