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 06-10-2015, 13:28
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default Adding nodes to a line segment via VBA

In Draw X7, if I create a line segment that only has 2 nodes, then select all the nodes with the node editing tool and hit the plus key on the numerical keypad, I get additional nodes, evenly spaced, every time i hit the plus key.

How can I achieve this via VBA?

Code:
Set chevron = ActiveLayer.CreateLineSegment(x, y, (w + 0.5), y)
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #2  
Old 07-10-2015, 02:07
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 146
Default Try it

Here simple code to add nodes to each segments
Code:
Private Sub AddNodes()
Dim s As Shape, nseg&
    Set s = ActiveShape: If s Is Nothing Then Exit Sub
    For nseg = s.Curve.Segments.Count To 1 Step -1
        s.Curve.Segments(nseg).AddNodeAt  'without parameters adds node to midpoint
    Next
End Sub
Or you can do it by one codeline:
s.Curve.Segments.All.AddNode

Last edited by shark; 07-10-2015 at 02:13.
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
Adding nodes to Node range prongs General 2 19-02-2012 14:13
draw nodes at crossing point between a line and a rectangle joyJOYJOY Corel Photo-Paint VBA 1 01-08-2007 13:18
Delete Segment Sablesword Other Oberon Commercial Products 0 07-01-2007 19:28
VBA Segment GetIntersections thira CorelDRAW/Corel DESIGNER VBA 0 18-11-2006 02:16
Convert cure or segment to many Nodes -=HKLC=- CorelDRAW/Corel DESIGNER VBA 2 04-10-2004 20:30


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


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