OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-03-2009, 10:51
derasje
Guest
 
Posts: n/a
Exclamation What is the CQL method

Hi friends, i am trying to apply the scale with image property to all or selected outlines, i got the solution on the site, but i want to do it with CQL method.

So can any one guide me with this, where can i get more info about CQL method ?


"Query:="@outline.type = 'none'" this method works, so how to use it to find outlined objects ?, i tried this way "Query:="@outline.type = 'cdrOutline'" but its not working.
Reply With Quote
  #2  
Old 12-03-2009, 12:09
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,778
Blog Entries: 10
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 Outline.type

outline.Type()
Returns the string representing the outline type. The possible values are: 'none', 'solid', 'dot-dash', 'enhanced' @outline[.type = 'solid' or .type = 'dot-dash'] => selects shapes with solid and dashed outlines

If you want to select all the shapes with outlines try this:
Code:
Sub OutlineCQLExample()
    Dim sr As ShapeRange
    
    Set sr = ActivePage.Shapes.FindShapes(Query:="@outline.type <> 'none'")
    sr.CreateSelection
    
End Sub
Since you end goal seems to be to find all outlines that are set not to scale you may want to try something like this:
Code:
Sub OutlineCQLExample()
    Dim sr As ShapeRange
    
    Set sr = ActivePage.Shapes.FindShapes(Query:="@outline[.type <> 'none' and .ScaleWithObject = 'False']")
    sr.CreateSelection
End Sub
You can also search for outlines by size:
outline.Width()
Returns the width of the outline in points:
@outline > {1 pt}
Reply With Quote
  #3  
Old 12-03-2009, 12:36
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,778
Blog Entries: 10
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 Help with CQL

As for help with CQL I find the help file the best, the programming guide also has some good info refer to my post here how to find this: Where to begin with CorelDRAW and VBA

Best of luck,

-Shelby
Attached Images
 
Reply With Quote
  #4  
Old 12-03-2009, 16:01
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

I also have a blog post on CQL: http://forum.oberonplace.com/blog.php?b=2
Reply With Quote
  #5  
Old 13-03-2009, 03:46
derasje
Guest
 
Posts: n/a
Default Thanks, Its works

Well i cant find CQL in my corel apps HELP, maybe because i have installed help files separately.

And how can i use it to work with powerclip, (applying properties to outlines inside powerclip)?.

Well again thanks for guiding me.
Reply With Quote
  #6  
Old 07-05-2010, 22:43
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.

Can you insert variables into cql queries? I can't seem to find any info on this.

Example:

shape.Width()

myVar = 1

Returns the width of the shape, in the current units of measurements

@width > {myVar in}

Thanks,

John
Reply With Quote
  #7  
Old 08-05-2010, 00:15
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,778
Blog Entries: 10
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 CQL Variable

Just break the string and insert your variable like this:
Code:
(Query:="@width > {" & myVar & " in}")
-Shelby
Reply With Quote
  #8  
Old 08-05-2010, 00:20
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Ah. I feel stupid. I wasn't thinking of it as a string.
Weird I couldn't find any examples like this though.
Thanks Shelby.

-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
Looking for info on method... ddonnahoe CorelDRAW/Corel DESIGNER VBA 7 30-08-2009 19:14
Method to do INSERT PAGE in VB.NET ? ljesus7 CorelDRAW/Corel DESIGNER VBA 0 12-02-2007 19:03
Selected object to other page Duplicate method ? ljesus7 CorelDRAW/Corel DESIGNER VBA 5 12-02-2007 17:37
Is there a property/method to check for shape off page? Shaddy CorelDRAW/Corel DESIGNER VBA 8 26-08-2006 14:04
SaveAs Method throwing an in consistent error wbochar CorelDRAW/Corel DESIGNER VBA 1 20-03-2003 15:37


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


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