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 23-08-2010, 23:23
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default find and select all dimensions...

Hi. trying to add a change endpoints code while the macro finds and separates all dimensions on all pages. It's not adding the endpoints...please review this when you can. Thanks!
Code:
Sub ApartDimensions()
    Dim sr As New ShapeRange
    Dim s As Shape, p As Page, i As Integer
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange

    For i = 1 To ActiveDocument.Pages.Count
        ActiveDocument.Pages(i).Activate
        For Each s In ActivePage.FindShapes(Type:=cdrLinearDimensionShape)
            sr.Add s
            sr.Add s.Dimension.TextShape
        OrigSelection.SetOutlineProperties StartArrow:=ArrowHeads(62)
        OrigSelection.SetOutlineProperties EndArrow:=ArrowHeads(63)
        Next s
        sr.BreakApart
    Next i
End Sub
Reply With Quote
  #2  
Old 23-08-2010, 23:33
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

ahhh...got it
Code:
Sub ApartDimensions()
    Dim sr As New ShapeRange
    Dim s As Shape, p As Page, i As Integer
    Dim OrigSelection As ShapeRange
    For i = 1 To ActiveDocument.Pages.Count
        ActiveDocument.Pages(i).Activate
        For Each s In ActivePage.FindShapes(Type:=cdrLinearDimensionShape)
            sr.Add s
            sr.Add s.Dimension.TextShape
        Next s
        sr.SetOutlineProperties StartArrow:=ArrowHeads(62)
        sr.SetOutlineProperties EndArrow:=ArrowHeads(63)
        sr.BreakApart
    Next i
End Sub
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
Searching for Dimensions and making disabling dynamic dimensioning gorgo2 CorelDRAW/Corel DESIGNER VBA 5 27-05-2010 23:03
Dimensions in 2 units vindaa CorelDRAW/Corel DESIGNER VBA 1 19-09-2009 02:28
Converting Dimensions bprice CorelDRAW/Corel DESIGNER VBA 3 23-02-2009 19:01
Macro for selecting Dimensions and Breaking it vindaa CorelDRAW/Corel DESIGNER VBA 4 14-09-2006 21:36
Create Dimensions via VBA ddonnahoe CorelDRAW/Corel DESIGNER VBA 1 14-10-2005 15:52


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


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