OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Help! Why the ApplyPatternFill Method take so much time? (http://forum.oberonplace.com/showthread.php?t=24847)

iceage3 10-09-2020 23:22

Help! Why the ApplyPatternFill Method take so much time?
 
In CorelDRAW 2017 and upper versions, when I use this ApplyPatternFill method of shape class, it will take about 10 seconds to finish the process. But in the old version like X4,X5,X6,etc, this will be really fast , so why? Anyone can help? We often do lots of patternfill works use VBA ,this means it will take much more time :bigcry::bigcry:

Thanks in advance!

Sample code like this will take 10 or more seconds in CorelDRAW 2017,2018 and upper versions:

Sub test123()
ActiveSelection.Shapes(1).Fill.ApplyPatternFill cdrFullColorPattern, "C:\1.pat"
End Sub

shelbym 25-11-2020 15:28

Help! Why the ApplyPatternFill Method take so much time?
 
Try loading it this way instead:
Code:

Sub test123()
    ActiveSelection.Shapes(1).Style.Fill.LoadFill "C:\Users\Shelby\Documents\Corel\Corel Content\Fills\Starter pack\Vector Pattern 232.fill"
End Sub

Happy Coding,

-Shelby

iceage3 01-12-2020 04:27

Thank you very much! Shelbym. This is fast indeed. The only problem is that we can't edit .fill files directly.:D


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

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