OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 10-03-2004, 19:58
Posts: n/a
Default StaticID Selection

Hello again,

I have automated the creation of several objects and I now need to create selection sets for grouping and repositioning.

Can you select multiple objects by using StaticID? (i.e. select objects 3 & 5 & 11)

If so, could someone please give me an example?

Reply With Quote
Old 10-03-2004, 21:38
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: StaticID Selection

If you use CorelDRAW 12, it can be easily done by using Document.CreateSelection method that takes a list of static IDs or shape references to create selection from.

ActiveDocument.CreateSelection 3, 5, 11

Dim aList As Variant
aList = Array(3, 5, 11)
ActiveDocument.CreateSelection aList
However if you use CorelDRAW 11 or 10 you will have to use Shapes.FindShape in v11 or Page.FindShape in v10 for each static ID:

Sub ReSelectIDs()
    Dim aList As Variant
    Dim sr As New ShapeRange
    Dim vID As Variant
    Dim s As Shape
    aList = Array(3, 5, 11)
    For Each vID In aList
        Set s = ActivePage.FindShape(StaticID:=vID)
        If Not s Is Nothing Then sr.Add s
    Next vID
End Sub
Reply With Quote
Old 11-03-2004, 22:16
Posts: n/a

oops... Replied to the wrong post, but you get the message right?...
thanks alot!
Reply With Quote

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
activeselection cloning s_federici CorelDRAW/Corel DESIGNER VBA 2 05-11-2004 09:59
Text selection problem ken_ac CorelDRAW/Corel DESIGNER VBA 2 10-02-2004 20:24
Node selection question Peter Clifton CorelDRAW/Corel DESIGNER VBA 1 02-12-2003 12:00
Selection of Text off-page D_Green CorelDRAW/Corel DESIGNER VBA 2 04-10-2003 16:34
New macros: Oberon Selection Manager & File Name inserte Alex Site News 0 24-08-2003 12:28

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

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