OberonPlace.com Forums > VBA add node problem
 Blogs Gallery FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

#1
16-09-2007, 09:09
 joyJOYJOY Guest Posts: n/a

Dear Sir,

Can anybody help me about create nodes at crossing point between a line and a rectangle when they are overlapping by corel vba ? Please help
#2
16-09-2007, 10:30
 shelbym Senior Member Join Date: Nov 2002 Location: Cheyenne, WY Posts: 1,769 Blog Entries: 10
CrossPoints

Have a look at this example.
Code:
```Sub FindCrossPoints()
Dim s1 As Shape, sr As New ShapeRange
Dim s As Shape
Dim cps As CrossPoints
Dim cp As CrossPoint

Set s = sr.Combine

Set cps = s.Curve.SubPaths(1).GetIntersections(s.Curve.SubPaths(2))

For Each cp In cps
ActiveLayer.CreateEllipse2 cp.PositionX, cp.PositionY, 0.1
Next cp
End Sub```
-Shelby
#3
21-03-2011, 09:56
 kobe Guest Posts: n/a
Crosspoints

#4
21-03-2011, 19:12
 runflacruiser Senior Member Join Date: Jun 2009 Location: Pigeon Forge, TN USA Posts: 811

Hi.
You must change the offset parameter to absolute and calculate the distance. Here's some old code from Alex.

Code:
```Sub Macro1()
Dim s1 As Shape
Dim s2 As Shape
Dim cps As CrossPoints
Dim cp As CrossPoint
Dim sp1 As SubPath
Dim sp2 As SubPath

Set s1 = ActiveLayer.CreateEllipse2(2.36889, 5.814937, 1.166118, -1.166118)
s1.ConvertToCurves
Set sp1 = s1.Curve.SubPaths(1)
Set s2 = ActiveLayer.CreateEllipse2(4.284047, 6.402252, 1.464031, -1.464031)
s2.ConvertToCurves
Set sp2 = s2.Curve.SubPaths(1)

Set cps = sp1.GetIntersections(sp2, cdrAbsoluteSegmentOffset)
For Each cp In cps
Next cp
End Sub```
-John

 Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home OberonPlace Discussion     Site News     Web site suggestions     Image Gallery     Testing Oberon Products     CurveWorks     SecuriDesign     Calendar Wizard     Oberon Function Plotter     Jigsaw Puzzle Creator     Other Oberon Commercial Products     New product ideas Corel User Forums     CorelDRAW         General         Tutorials         FAQ         Feature requests/wishlist         Macros/Add-ons         Artwork Showcase     Corel DESIGNER         General         Tutorials         FAQ         Feature requests/wishlist         Macros/Add-ons         Artwork Showcase     Corel PHOTO-PAINT         General         Tutorials         FAQ         Feature requests/wishlist         Macros/Add-ons         Artwork Showcase     General         About Corel         Off-Topic Developer Forums     OberonPlace Development Portal     VBA         CorelDRAW/Corel DESIGNER VBA         Corel Photo-Paint VBA         Code Critique     Corel Script         CorelDRAW CS         Corel Photo-Paint CS

 Similar Threads Thread Thread Starter Forum Replies Last Post Jon Lorber CorelDRAW/Corel DESIGNER VBA 3 12-06-2006 11:47 mudhen General 3 17-07-2005 11:01 ddonnahoe Code Critique 6 23-02-2005 16:33 bumblebee CorelDRAW/Corel DESIGNER VBA 4 04-08-2004 15:07 LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 14:28

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

 OberonPlace.com - Archive - Top