Overview

As of 16.0, preview image support has been implemented for core Parts and is no longer exclusive to DsParts.

The system for generating preview images is:

  1. Preview images are saved to cmWritable("tmp/partPreviewImageCache/")
  2. A str->Url map is stored in Space cacheData for easy access
  3. Post finalize after merge hook collects unrendered parts (cm/core/part/hooks.cm)
  4. If unrendered parts list is large enough, renderPartPreviewImagesTask task begins (cm/core/part/tasks.cm)

Compile Time Changes

class Part

Added method completeSpecifiedValue() for returning the value of what complete means.

New: extend public str completeSpecifiedValue()

Default return values were moved to constants in cm.core.part.cm.

New:    public const str completeSpecYes = "Y";
        public const str completeSpecNo = "N";

Added method completedSpec() for indicating whether there is a completed specification of this part.

New: extend public bool completedSpec()

completedSpec() needs to return true or false in order to get the default complete values 'Y' or 'N' in the Complete column in Calculations. completedSpec() will also drive the output for Status column and Error Description in Spec PMX export.

MR: Refactor completeSpecified

PartInfoTree

The following functions have been added to PartInfoTrees:

Added: extend public bool containsSpecial() {}
Added: extend public PartSpecial special() {}
Added: extend public str code() {}
Added: extend public str description() {}
Added: extend public double price() {}
Added: extend public str groupDescription() {}

Runtime/Behavior Changes

Part

Many extensions have adopted the FIKA Query and part special interface. As of 16.0, the FIKA interface has been moved down to the cm.core package. See Migration Documentation for New Features to read more about the additional functionality added for Query Dialogs and part specials.

The following functions on Part account for PartSpecial information now.

// adds specialFlattenableKey() to tail of key
extend public str flattenableKey() {}

// returns PartSpecial part number if found
extend public str articleCode() {}

// returns PartSpecial description if found
extend public str description(Space space=null) {}

Callout for Part specialsKey()

The following function has been added to Part with the new Query dialog feature for 16.0.

// a key for storing PartSpecials on a PartSpecialHolder
extend public str specialsKey() {
	return uniqueID();
}

Note that functions like articleCode(), description(), and flattenableKey() on Part now account for special information. This means that if specialsKey() or uniqueID() call any of these functions or others that utilize special information, a stack overflow error may occur.