OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   how to add node at specific position in VBA (http://forum.oberonplace.com/showthread.php?t=24818)

aakkaarr 12-11-2018 10:24

how to add node at specific position in VBA
 
how to add node at specific position in VBA

shark 13-11-2018 04:24

use Segment.AddNodeAt or SubPath.AddNodeAt

aakkaarr 13-11-2018 10:18

how to use Segment.AddNodeAt
If I select a point on active curve by using Getuserclick which gives me x,y coordinates
e.g.
clicks = xyClicks
x = clicks(1)
y = clicks(2)

Public Function xyClicks()
Dim x As Double, y As Double, Shift As Long
Dim clicks(1 To 2) As Double
If ActiveDocument.GetUserClick(x, y, Shift, 5, False, CursorShape:=301) <> 0 Then xyClicks
clicks(1) = x
clicks(2) = y
xyClicks = clicks
End Function

shark 16-11-2018 04:10

use FindSegmentAtPoint(x,y,ofs) to find segment, then AddNodeAt ofs to create node


All times are GMT -5. The time now is 14:32.

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