Hi Folks,
Is there a way or a macro to connect two nodes of two curves with one keystroke?
There is a docking window Join Curves, but I always have to confirm the action with a click.
Thanks in advance
Corel Mutt
The best I am aware of is a two-keystroke solution.
Before selecting nodes, Combine the curves (Ctrl + L) into one curve.
After selecting nodes, use the Join command. If you want to do it using a keyboard shortcut, you would need to assign one to that command. It doesn't have one assigned by default.
Hello mighty eskimoI have cobbled together the following macro:[CODE]Sub Extend _V1() Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange OrigSelection.CustomCommand "ConvertTo", "JoinCurves", 1000 End Sub[/CODE]This allows me to connect two (uncombined) curves, but it will (distance of 1000 pxl) connect all nodes instead of just the selected ones.The Join Curves command (extend, chamfer, etc.) cannot be recorded with the macro-recorder. Is this intentional? What is the code for the command?CheersCorel Mutt
Hello mighty eskimoI have cobbled together the following macro:
~~~Sub Extend_V1()Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange OrigSelection.CustomCommand "ConvertTo", "JoinCurves", 1000 End Sub~~~
It allows me to join two (uncombined) curves, but it will (distance of 1000 pxl) join all nodes instead of just the selected ones.The Join Curves command (extend, chamfer, etc) cannot be recorded with the macro-recorder. Is this normal? What is the code for the command?
PS: How can I embed code in a post?CheersCorel Mutt
Corel Mutt said:How can I embed code in a post?
I use http://hilite.me, and use the option for VB.net.
In the post editor here on the CorelDRAW Community site, use Tools > Source code to see the code for your, and then paste the HTML from hilite.me there.
The result will look something like this:
Sub count_shapes_2() Dim sr As ShapeRange Set sr = ActivePage.ActiveLayer.Shapes.FindShapes(, , , "@com.issimpleshape = 'true'") MsgBox sr.Count End Sub
Corel Mutt said:The Join Curves command (extend, chamfer, etc) cannot be recorded with the macro-recorder. Is this normal? What is the code for the command?
There is some stuff that cannot be recorded automatically as VBA code.
Looking at the API documentation, I can see how to join one node to another within the same Curve using the Node.JoinWith method, but I'm not aware of a direct way to have it Combine two Curve shapes, and then join two nodes that had already been selected in the two separate shapes.