OberonPlace.com Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 15-08-2014, 15:03
nic nic is offline
Member
 
Join Date: May 2009
Posts: 90
Default Loop thru shapes and break at nodes

This fails with Node belongs to another shape error - Ive had a read of the previous posts but still cant see how Im to do this. Given the macro is run on a doc which only has curves Im looking for help to make this macro break them all up into two node curves, I can see the nr needs to be reset to blank each time but cant see how to do it. Any help appreciated.

Code:
Sub BreakNodes()
    
    Dim s As Shape
    Dim sr As ShapeRange
    
    Dim n As Node
    Dim nr As New NodeRange
    
    Set sr = ActivePage.Shapes.FindShapes()

    For Each s In sr
       
        For Each n In s.Curve.Nodes
          nr.Add n
        Next n
        
        nr.BreakApart
        s.BreakApart
                       
   Next s

End Sub

Last edited by nic; 15-08-2014 at 15:27.
Reply With Quote
 

Tags
noderange loop


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
Do...loop error noj CorelDRAW/Corel DESIGNER VBA 2 19-10-2011 10:25
Can't loop thru layers xxxslowjoe CorelDRAW/Corel DESIGNER VBA 1 06-06-2009 13:52
Simple Loop? dan CorelDRAW/Corel DESIGNER VBA 3 13-10-2004 14:31
Gradient + Break Apart Hernán New product ideas 6 25-04-2004 15:34
+ Break Apart Hernán CurveWorks 1 15-02-2004 17:49


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


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