OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 11-03-2016, 11:47
nic nic is offline
Join Date: May 2009
Posts: 90
Default Break at specified node

Im trying to find the middle node on curves which have only one sub-path but a variable number of nodes, and then split the curve into two objects but struggling with syntax - I first check to see there are at least 3 nodes and then

Set sh = sr.Shapes(n)
 ndCnt = sh.Curve.Nodes.All.Count
 ndSplit = Int(ndCnt \ 2)
 Set nr = sh.Curve.Node(ndSplit)
srBrokenCurves.AddRange sh.BreakApartEx
This fails at 'Set nr = sh.Curve.Node(ndSplit)' with 'Object dosent support this property/method"


This works
ndCnt = sh.Curve.Nodes.Count
 'check there are at least 3
     If ndCnt > 2 Then
           'set the node to be split on
            ndSplit = Int(ndCnt \ 2) + 1
            Set nd = sh.Curve.Nodes(ndSplit)

Last edited by nic; 13-03-2016 at 15:12.
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
break until single character nikhiscd CorelDRAW/Corel DESIGNER VBA 3 22-06-2008 05:26
AtisicMediaGroup shape can't break? mitchellhu CorelDRAW/Corel DESIGNER VBA 2 04-12-2007 20:28
Break Each Object Apart within Selection geopig CorelDRAW/Corel DESIGNER VBA 2 15-04-2005 14:38
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 11:22.

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