OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-08-2013, 08:57
nic nic is offline
Member
 
Join Date: May 2009
Posts: 90
Default Reducing number of nodes - QR codes

Im importing a number of qr codes as svg's and as part of a larger script would like to simplify them to reduce the overall file size.

Each Svg is made up of a series of small black squres in the right places.

Found a couple of things on the forum that seem to apply - using corelscript to weld the small squares together (which works) but leaves all of the original nodes most of which are superfluous. I have tried using nodes.all.autoreduce but that throws up an Object dosent support this method error.

Any advice on where it's going wrong would be appreciated.
nic

Code:
Dim OrigSelection As ShapeRange
    Dim s As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    
    Set s = OrigSelection.UngroupEx
    
    CorelScript.Weld False, False
    
    If s.Type = cdrCurveShape Then
            's.Curve.Nodes.All.Smoothen 0.01
            s.Curve.Nodes.All.AutoReduce 0.003
        End If
Reply With Quote
  #2  
Old 15-11-2013, 03:37
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,788
Blog Entries: 12
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default AutoReduce

You cannot use AutoReduce with a ShapeRange, it needs to be a shape, so you would need to loop each Shape in the ShapeRange and AutoReduce it.

-Shelby
Reply With Quote
Reply

Tags
reduce nodes, weld


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
creating new QR codes in X6 from VBA default.user CorelDRAW/Corel DESIGNER VBA 1 28-04-2013 00:39
How to improvise codes of macro for x64 corel aakkaarr CorelDRAW/Corel DESIGNER VBA 1 25-03-2012 19:36
Print codes in Macro JacquesCHENU Macros/Add-ons 2 29-12-2010 05:38
can the dimension be created by codes aakkaarr CorelDRAW/Corel DESIGNER VBA 0 20-03-2009 13:46
Reducing Nodes Semi Automatic Superfreak New product ideas 2 05-10-2004 03:10


All times are GMT -5. The time now is 13:17.


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