![]() |
|
#1
|
|||
|
|||
![]()
OK, i have been fiddling with vba scripts for a small while and trying like hell
to go by some of the samples in the drawvba.chm help file and whats posted here. I managed a few items within draw and got some decent results. I been reading this forum too for a while and got an idea but it isnt enough. Googling vba/coreldraw just brings me back here and there is enough for a newbie to do, meaning there are things mentioned but small portions of code or lines of code posted and sometimes leaving you stuck in the forest. I've done me damnedest to figger this out and i get no where or one object is a good result leaving the rest at original state. Im sure theres a batch other people in my position that would like to get easier answers to things like this. It's tough and remember, you were once in a shoe as mine. ![]() The simplest of simplest is what i need..... I have 1 or more objects selected. In the mix, it can be an Ellipse, a Rectangle or some other 'line' shape. I need a simple code that will: ------------------------------------------------------ Select All & Convert all Lines to curves and cusp nodes (for the Ellipses) I would like NOT to have any Smooth or Symmetrical curves ------------------------------------------------------ ** Is there any type book that may have a better learning tutorial on VBA for Coreldraw... not Excell out there that one could buy? Thanx all who reply I await your help -B |
#2
|
|||
|
|||
![]()
try this. It doesn't target specific shapes, you'll need an if/than statement looking for things in the for/next loop (kinda like If s.Type = cdrEllipseShape Then...) But since I'm not exactly sure, I just left it general.
Code:
Sub TempTest() Dim sr As ShapeRange Set sr = ActiveSelectionRange Dim s As Shape Dim nr As NodeRange For Each s In sr s.ConvertToCurves Set nr = s.Curve.SubPaths(1).Nodes.All nr.SegmentRange.SetType cdrCurveSegment nr.SetType cdrCuspNode Next s End Sub Last edited by Shaddy; 11-12-2005 at 00:13. |
#3
|
|||
|
|||
![]()
Thanks Shaddy that worked fine for the objects.
How about text... I didnt include that. I tried it on some text before and nothing happened. But if I broke it apart and then retried it, it worked. What needs to be added for the 'combined' objects? (Insides of B, D, R, etc) forgive me for i am dense and just woke up ![]() Last edited by Booker; 11-12-2005 at 07:12. |
#4
|
||||
|
||||
![]()
The Shaddy's code only convert the nodes of the first subpath to lines. But if you need all the segments/curves, just a slight modification of the code will do the trick (I have also changed the node setting to cusp before converting segments to lines):
Code:
Sub TempTest() Dim sr As ShapeRange Set sr = ActiveSelectionRange Dim s As Shape Dim nr As NodeRange For Each s In sr s.ConvertToCurves Set nr = s.Curve.Nodes.All nr.SetType cdrCuspNode nr.SegmentRange.SetType cdrCurveSegment Next s End Sub |
#5
|
|||
|
|||
![]()
Yes Alex thanks for your reply also... The PDF is open at all times for me
and well sometimes it can be frustrating. Im trying to get a grasp of the severe basics and coming along i think ok. Im just trying to get others in my position to step up and ask Q's and whatnot. I'd like to see some activity so I guess i'll be asking the lamest of the lame questions. I hope the rest dont mind my dense learning but hopefully others could benefit also. Anyways, thanx all B ![]() ![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Recreating curves in VBA code | Alex | CorelDRAW/Corel DESIGNER VBA | 19 | 05-03-2011 20:37 |
How can I find shortest distance between two curves, shapes? | Jab | CorelDRAW/Corel DESIGNER VBA | 3 | 22-12-2004 13:16 |
Convert barcode to curves | pp21 | New product ideas | 1 | 10-03-2004 22:56 |
Corel to DXF - curves too jagged for laser cut out letters | knight74 | New product ideas | 2 | 19-02-2004 08:49 |
[b]Smoothing curves[/b] | LOT | CorelDRAW/Corel DESIGNER VBA | 2 | 11-02-2004 08:24 |