Recipes 6 entries
copy-paste ready workflows
Entries in this section
- Throttling: why time.sleep(0.2) appears everywhereCorelDRAW is a single-threaded STA server. Python issues commands far faster than CDR can
- Batch undo groupWrap big jobs in BeginCommandGroup / EndCommandGroup and one Ctrl+Z in CDR undoes the whol
- Set font, read back, then fall backSee the code below. This is the most valuable pattern in the entire script: any property t
- Verify the font before converting to curvesConverting to curves is irreversible, so the order is fixed: set the font → wait 0.3 s → r
- Process in index-range batchesWith a lot of JSON records, run start/end slices and print "total / pages built / skipped"
- Skip missing data instead of raisingif not img_find_in: skip_cnt += 1; continue — a missing image gets counted and skipped rat
Getting StartedConnection & InitApplicationDocumentPageLayer & ShapesGeometry & TransformGroup / Order / BooleanShape AppearanceTextTextRangeFillOutlinePowerClipFountain FillPattern / Texture FillTransparency & BlendEffectsColorCurve & NodeBitmapFind & TraverseUnits & ConversionImport / ExportEnumerationsObject DataAlign / DistributeLayer AdvancedView & PerformanceEventsRecipesPitfalls