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
Old 04-10-2014, 10:25
nic nic is offline
Join Date: May 2009
Posts: 90
Default Working with parts of a curve that has been broken

the code below adds nodes to a curve and then breaks the curve apart but I dont know how to then work with the new curves (Im intending to recolour them each in a separate colour).

How do you refer to the new objects created when you break a curve apart?

Dim s as shape, sr as ShapeRange, sp as SubPath, nr as NodeRange 
Set sr = ActivePage.Shapes.FindShapes()

'loop thru shapes
For Each s In sr

   s.Curve.SubPaths.First.AddNodeAt 0.333, cdrRelativeSegmentOffset
   s.Curve.SubPaths.First.AddNodeAt 0.666, cdrRelativeSegmentOffset

    'break nodes and curve
    Set nr = s.Curve.Nodes.All
    'bogus code
    's.PART1.Outline.Color.RGBAssign 255, 0, 0
    's.PART2.Outline.Color.RGBAssign 0, 255, 0
    's.PART3.Outline.Color.RGBAssign 0, 0, 255
Next s

Last edited by nic; 04-10-2014 at 11:40.
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
Custom Docker to generate parts of 3D box for laser/CNC cut Plixo CorelDRAW/Corel DESIGNER VBA 3 19-12-2013 22:07
Splict funtction parts retrieval ddonnahoe CorelDRAW/Corel DESIGNER VBA 2 06-04-2012 08:30
dimensions broken apart HeauxmBru General 3 29-04-2011 11:14
X4:s1.PlaceTextInside itm1 broken ddonnahoe CorelDRAW/Corel DESIGNER VBA 3 29-01-2008 08:31
ActiveView.OriginX is broken???? jemmyell CorelDRAW/Corel DESIGNER VBA 2 24-01-2005 20:09

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

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