CorelDRAW X5 :: Create Macro That Automatically Delete All Color Styles
Nov 17, 2010
Now that SP2 is out and we can delete all in one sweep, is it possible to create a macro that would automatically delete all color styles as soon as any file is open? I never use that feature and would gladly pay for such a macro.
Is there maybe a macro for styles (either text or graphics) that
1. connects objects assigned with a style, to that style LIVE? eg, altering the style properties, automatically all objects assigned with that style will adopt those changes too,
2. offers LOT more configuration options than the current default CorelDraw styles options
I have (unfortunately) the necessity to modify into some files (which are used as models) the print style preset.
These files, which are necessary for the realization of electrical diagrams, have inside hundreds of layout.
Each layout set default printing parameters, so as "Laser b/n.pc3," as the paper size "A4" scale "Scale to Fit", and plot style "Schemi.ctb", etc. ..
Is there a way to create a macro (a field unknown to me) or something similar, to automatically change in all the default layout, for example, the printer "Colori.pc3" and the print style in "Schemi_colori.ctb "?
I've playing around trying to write a macro that with the click of one button will remove all my guidelines, not hide them, delete them. I can't seem to make it work.
With the code below, I can delete off-page objects...as long as they are assigned the Desktop layer. If there is no object on that layer, I want a warning box to pop up stating so. How can I do this? I imagine that I'll need If then statement something like 'If .....objects on layer Desktop <0 then pop up warning message box, end if.
Private Sub CommandButton4_Click() ActiveDocument.BeginCommandGroupActiveDocument.MasterPage.DesktopLayer.Shapes.All.Delete ActiveDocument.EndCommandGroupEnd Sub
To create 2-color artwork from any colored vector clipart I used to be able to:
import colored clipart convert to CMYK if needed select entire graphic and create new styles with 2 parents change (edit) the colored parent to a named Pantone spot color (the child colors automatically become percentages of the Pantone spot color) "find and change" the remaining CMYK to Grayscale, and then back to CMYK (this ignors the spot color and converts the annoying rich blacks to percentages of K) export to a PDF file--which when imported into, say, InDesign, will separate on the K and Spot Color Plates only, in all its glorious shades of gray and tints of Pantone spot color.
I'm completely at a loss on how to do this in X6, and I'm on a short deadline.
What I am trying to do is check if a shape does not match a known set of values. If it does not it will run code where the "If msgbox" is at. What I have works if my line or object has a Cyan outline. The issue I am having is when it is checking a line that is any other color that doesn't have Cyan = 100, it errors out.
Below is what I am trying to use.
Sub Start() Dim s As Shape Dim sr As ShapeRange ' ActivePage.Shapes.All.CreateSelection Set sr = ActiveSelectionRange For Each s In sr If s.Type = cdrTextShape Then GoTo s_A If s.Outline.Color.CMYKCyan = 100 Then GoTo s_A If MsgBox("dude", vbOKCancel) = vbCancel Then GoTo s_B s_A: Next ss_B:End Sub
I'm sure there are many of you out there that at least every once in a while struggle to match a certain color - as CLOSE as possible. You can tweak your RIP settings, color management settings, etc but often I find myself just generating some random color samples to get the closest color. I have CMYK charts printed off, but they are only going to show so many colors, you know? What I am looking for (and will pay good money for, too - Nazdar's Catzper software does something along these lines, but is much too complex with Lab values, etc and lists for $295) is a macro that will take a color swatch and generate a bunch of other color swatches (maybe by user preference?) just adding and subtracting C M Y K - you print this off and pick the closest color! Thereby making it a 1-step operation instead of back-and-forth many-step operation. I have to admit, we are very picky about matching colors here.
I try to create a curve with 3 or more equal segments. When I draw random curve using the "Freehand tool" I always get curve with several not equal segments.So how can I create a curve using VBA Macro so that the curve has equal length of the segments.I attach two pictures with curve that i have and with curve that I need to have.
As with any upgrade to Corel over the past decade, they change things on new versions and hide them! I've been using since v1.0 (which instantly became v1.1 upon release).
I JUST installed v X6 and off to my first problem within 10 minutes.
The old menu in X5 used to have a docker called "Graphic and Text" which is no longer available in X6. After some research, it looks like the "apply a style or style set to an object" is the way to go, HOWEVER if I right click on the text as suggested to find the "Object Styles" menu, the sub menu is a blank little rectangle that won't display the menu items.
How to copy a style to a menu and then apply it as well in X6?
I saw a macro that does this a while ago, but I could very well be wrong. If it doesn't already exist, I am not even sure if it is possible, so I thought I'd ask the Macro Masters here!
Lets say I have a page fill of objects/shapes/text with all sorts of different colors.
I select the black color (or whatever color) but would actually like to select ALL colors other than the black color that I have selected.
So, if I have a page with Black, Red, Green & Blue shapes, I select an object colored black, the macro would then select ALL objects/text on the page that are NOT black.
I have attached a free macro to change the text color of cells in a table. Without the macro there is currently no way to select more than one cell and change the text color.
The macro allows the user to either:
click on a table (to select it) and then apply a new color to ALL text in the table; or choose a new color from the macro from, select some cells in a table and then apply that color to the text in those selected cells
Please note in step 2 it is important you choose the new color first and then select the table cells. If you do it the opposite way around, while choosing a colour you will deselect the selected cells and apply color to all of the text in the table.
Is it possible yet to do this? I'd like to pick several points on the screen and get the color from each spot separately.Current System: i3 3.07ghz, 3gb ram, Windows 7 32 bit with all updates and X6
I am wondering if there is a way that I could replace colors automatically. I know there are tools like Color Replace but it works with one palette at a time. What I am looking for is:
suppose a particular design has 4 colors in RGB mode. A,B,C and D
A: 2-72-127 B: 1-49-87 C: 187-153-238 D: 8-55-255
And lets assume that I have another set of colors I want to change to: E, F, G and H
I think I need to change the cdrTextPropertyFill using cdrTextPropertySet. If you look at the Property Manager Window with Artistic Text selected go to the 5th tab (format). On the bottom is background color: with two drp downs. One for textbox background and one for character background.
I would like to be able to change these settings in a macro. I think this line is finding the text on the graphic, now I need to change the background.
The most annoying in the style sheets, view manager since x3 is still existed in the x6 as style sheet sets having unnecessary styles which i have not created besides color styles & view manager as well. Are they not considered anyhow ?
Default style set is ok and Styles is also ok to create our own but Why this nuisance of style sets which are having a lot of dump. Truly view manager is unnecessary docker i think but have lots of zoomed data.
My CorelMacros.CreateColorSwatch macro has stopped dumping the swatches into whatever blank Letter-sized document I have open (which is how it used to work) and instead it is creating a new document, at 4.25" wide x 7" high, and dumping the swatches into that. Using Pantone Solid Coated, but it's doing this regardless of what palette I choose.
There is no option in the Macro's dialog box to alter or even instantiate a page size, and I cannot find in the code of the macro where to set this variable.
Whenever I type a url or web address Corel insists upon underlining and making it a link; how do I turn this off. I highlight the url and remove the address from the url field and click apply and it takes numerous times repeating this process to remove the link. I want to turn it off so it does not automatically create a link.
No Clean button or command in document palette settings.. Of course there are reset command but not to positive results.. I want to delete the colors in document palette but no clean or delete colors command... Also color styles is not useful and very sophisticated.
I have made a macro that asks for a location on the file server (=client name) and then the project name. It then automatic creates the correct folders, opens my custom assembly template and changes an ipart that is by default in it.
That's all great and can save us a ton of time, but the last step is to automatic save the assembly! I just can't get it working and can't find the correct code.
I have defined the target folder earlier and the file name of the assembly is identical to this folder. For example
the code that I think should work looks like this:
Sub SaveAssembly() Dim oAssDoc As AssemblyDocument Set oAssDoc = ThisApplication.ActiveDocument oAssDoc.SaveAs ("O:ProjectsclientNameClientProject1ClientProject1.iam", False)End Sub
But it doesn't work, I always get the error message "Compile error: Expected: =" Whatever I do next I don't get the code to work
Everytime I crete a box etc of a shape layer a layer I used previously is being applied to that layer automatically? Can someone help. It has to be a simple thing I am not aware of.