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 11-03-2016, 10:47
nic nic is offline
Member
 
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

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

EDIT:

This works
Code:
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)
            nd.BreakApart
nic

Last edited by nic; 13-03-2016 at 14:12.
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
break until single character nikhiscd CorelDRAW/Corel DESIGNER VBA 3 22-06-2008 04:26
AtisicMediaGroup shape can't break? mitchellhu CorelDRAW/Corel DESIGNER VBA 2 04-12-2007 19:28
Break Each Object Apart within Selection geopig CorelDRAW/Corel DESIGNER VBA 2 15-04-2005 13:38
Gradient + Break Apart Hernán New product ideas 6 25-04-2004 14:34
+ Break Apart Hernán CurveWorks 1 15-02-2004 16:49


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


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