OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 22-09-2014, 09:19
nic nic is offline
Member
 
Join Date: May 2009
Posts: 90
Default Virtual shape and speed up

Hi,
the code below takes the data from an array and draws a curved line through a set of x,y points. I would like to speed up that process and think doing it with a virtual layer would help but I can't get the syntax right. Where would i need to insert ActiveVirtualLayer and LogCreateShape?


Code:
    Set crv = CreateCurve(ActiveDocument)
    
    Set sp = crv.CreateSubPath(Data(1, 0), Data(1, 1))
    
    'add curves to shape
    For n =  2 To 2000
        sp.AppendCurveSegment Data(n, 0), Data(n, 1)
    Next n
    
    sp.Closed = False
    
    Set sShape = ActiveLayer.CreateCurve(crv)
and can the following be speeded up by smoothing all the nodes in one go rather than running through a loop?

Code:
  'smooth nodes
    Set nr = sShape.Curve.Nodes.All
    For Each nd In nr
        nd.Type = cdrSmoothNode
    Next nd
Thanks
nic
Reply With Quote
 

Tags
smooth nodes, virtual layer


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

Advanced Search
Display Modes

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot rotate a virtual shape with the same precision as a shape runflacruiser Macros/Add-ons 1 19-01-2011 15:34
Virtual layers, shapes and drawing speed jemmyell CorelDRAW/Corel DESIGNER VBA 2 06-05-2009 16:40
Speed-up processing 10 times :-) wOxxOm CorelDRAW/Corel DESIGNER VBA 2 12-03-2008 03:17
Speed up printing RonHill General 0 22-06-2004 14:20
speed difference between corelscript and vba bbolte CorelDRAW CS 2 05-12-2002 18:58


All times are GMT -5. The time now is 02:40.


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