connecting users of the CorelDRAW family of products

Support of STYLES in coreldraw X6 VBA macros

rated by 0 users
This post has 3 Replies | 1 Follower

Share  
Page 1 of 1 (4 items) | RSS

pvfpvf Posted: Mon, May 7 2012 7:28

I've been using a VBA program in CorelDraw X6 (windows 64-bit) to create shapes on layers. I can easily give those shapes desired outline or fill characteristics using code such as shape.Outline.Width = ... or shape.Fill.UniformColor...

However, what I wanted to do was assign a named outline or fill style to the shape. It seems this isn't properly supported at present. There's no mention of such styles in the Graphics Suite X6 Macro Programming Guide (although this is hard to tell because the word "style" arises in numerous other contexts). Browsing the object model, I find shape.ApplyStyle(StyleName As String) which "applies a text/graphic style". However, if I say

shape.ApplyStyle("cynaos")

where "cyanos" is an existing named outline style, it has no effect and produces no error.

Anyone know anything about this? Also, I'd like to apply the new "style sets" but there's no mention whatever of those, even in the X6 object model. 

Top 25 Contributor
Ottawa (ON), Canada
Male
CorelEmployee

Styles are not available through the Object Model at this stage, but we plan to add this with the first update later this year.

Gérard

Using CorelDRAW Graphics Suite X6.3 with Premium Membership, CorelDRAWTechnical Suite X6 & CorelCAD 2013
on Windows 8 Pro 64-bit  / Intel Core i7, 8 Gb RAM, nVidia NVS 4200M

Thanks.

As styles and style sets seem to be in the same name space, I assume I shall also be able to apply a style set in the same way?

Top 25 Contributor
Pune, India
Male
CorelDRAWMaster

Happy to know that Gerard.

Gerard Metrailler:
Styles are not available through the Object Model at this stage, but we plan to add this with the first update later this year.

Page 1 of 1 (4 items) | RSS
© Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions / User Guidelines.