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 19-02-2004, 05:01
ama
Guest
 
Posts: n/a
Default Need help accessing objects in a group

While running my macro, it takes all objects one by one, including ones that i dont want to transform. The only way i know to avoid this - put objects on the different layers.
I wonder if there is another way. for example to operate only the objects that are members of some group.

Will it be working and how to do it
Reply With Quote
  #2  
Old 19-02-2004, 08:36
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Need help accessing objects in a group

I guess in this situation you should ask yourself a question - what do I want to do? How would you describe what exactly you want to process?

Probably, you would select the objects you are interested in first, right? Or, maybe, you want to process rectangles only and leave text and ellipses alone. There must be some criteria you want to use to separate the objects you want to process from those you don't.

If you describe more what you need to do, it would be much easier to explain how to do it.
Reply With Quote
  #3  
Old 19-02-2004, 09:33
ama
Guest
 
Posts: n/a
Default

ok.
I have some document with graphics and text. I convert text to curves and breaking it apart. then i have to operate the shapes, which before was symbols of text, AND ONLY THEM. since now they are shapes - when i write in vba subroutine that takes objects one by one - and it takes all shapes. Shure, you can exlude guides, rectangles and so on, but there still will be objects that just shapes, and transform will be applied to them.

How to operate a group os shapes, since they don't have differences for
corel and its VBA from another shapes?
Reply With Quote
  #4  
Old 19-02-2004, 10:51
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Converting text to curves

Ok, here is one example of how this could be done. I created a ShapeRange object which can be used to accumulate a list of shapes. Then I process text objects only, convert then to curves and break them apart. Each resulting curve is appended to the range.

Then when everything is done, then the fills are removed from all objects and 1 pt red outline is added.

Code:
Sub TextToCurves()
    Dim sr As New ShapeRange
    Dim s As Shape
    
    For Each s In ActivePage.FindShapes(Type:=cdrTextShape)
        s.ConvertToCurves
        sr.AddRange s.BreakApartEx
    Next s
    
    sr.ApplyNoFill
    sr.SetOutlineProperties 0.0139, Color:=CreateCMYKColor(0, 100, 100, 0)
End Sub
I hope this helps.

P.S. The above is for CorelDRAW 11.
Reply With Quote
  #5  
Old 20-02-2004, 02:29
ama
Guest
 
Posts: n/a
Default

2 questions:
1. what if i operate "ex-text", that is already curves

2. when text is converted to a curve - each symbol breaks into separate closed outlines. for example - letter "o" - it becomes two different circles.
how can i convert it and this two circles stay combined.

In fact its possible to write a procedure, but i dont know how - maybe to check coordinates of outlines and if one lays inside another - combine them. But what if original text was written using handwrote italic font - on some symbols resulting outlunes may no lay inside each other by one of two coordinates
Reply With Quote
  #6  
Old 20-02-2004, 11:28
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

Ok, now you really need to describe WHAT you need to do. Only then will I be able to provide you with some solution. Here is what you said before:

Quote:
I have some document with graphics and text. I convert text to curves and breaking it apart. then i have to operate the shapes, which before was symbols of text, AND ONLY THEM.
And the example above I gave did exactly that. You shouldn't assume that I (or anyone else) understands exactly your particular task, so giving as much details as possible upfront really helps determine the ways to accomplish the task...
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
fit objects to path edges geopig Other Oberon Commercial Products 1 02-08-2006 23:28
Find objects by properties Webster CorelDRAW/Corel DESIGNER VBA 8 01-12-2004 18:51
Converting objects color properties jwknight CorelDRAW/Corel DESIGNER VBA 1 23-10-2003 10:03
replace objects of certain color jwknight CorelDRAW/Corel DESIGNER VBA 3 14-08-2003 12:43
I need to update objects visibility faster NEHovis Corel Photo-Paint VBA 0 18-07-2003 07:54


All times are GMT -5. The time now is 12:41.


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