Hi everybody!
I trying to script a macro that will draw lines in place of controlpoints arrows (of Bezier curves). My problem is (see row 37): Why ShapeRange.Group returns "Nothing"? But in other subroutine it working fine... Please help me - where is my error?
Generally I want to draw lines at selected nodes if it was selected... In other case - it must draw lines at starting and ending nodes of each subpaths of selected shapes. After all drawns - lines must be grouped and remain selected.
This is how I try to do it:
Having looked through the help, I found that NodeRange can collect nodes only from a single curve. Also, I discovered that if we'll trying to group something, when ShapeTool (cdrToolNodeEdit) is active - ShapeRanges will be grouped, but as result always will return Nothing. So, before to group ShapeRanges, always you must switch to "Pick Tool" (cdrToolPick). And, if we made some selection with ShapeTool - we need also to clear all selections, before switching to Pick Tool. So, I rewrote my code. And it work fine! Look my post below.
HI.
I didn't get it to return 'nothing' when using a single curve shape. The item pictured is one single curve shape.
Oh, yeah! I'm forgot to say, that I've not finished my code - especially section between lines #17 and #27, when nodes is not selected. But, when I draw a curve line (for example) with 2 nodes in the middle on it and select them - it don't wanna group just new cereated shapes in sr (ShapeRange). To be precise it is grouped, but sr.group return 'Nothing'