Click or drag to resize

DrawingCreatorExtensionOverrideDrawingFilename Method

Called when the drawing rule is selected for a component at Batch Operations. You can override drawing name (full path). If overriden to empty, then drawing creation is ignored. If you need licensed Document Manager to inspect the source model, you can obtain it with static call CTInterface.GetSWDocManager(). SldWorks instance can be obtained and cached at MyExtension.Hook.

Namespace:  CTExtensions.Interfaces
Assembly:  CTInterface (in CTInterface.dll)
Syntax
public virtual bool OverrideDrawingFilename(
	CTDrawingAutomation oAutomation,
	string bsModelFilename,
	string bsModelConfiguration,
	string bsDrwFilename,
	out string bsDrwFilenameOverride
)

Parameters

oAutomation
Type: CTDrawingAutomation
Automation rule to which this extension is attached to.
bsModelFilename
Type: SystemString
Full path of the model for which this rule is about to suggest a drawing name.
bsModelConfiguration
Type: SystemString
Configuration of the model for which the drawing should be created.
bsDrwFilename
Type: SystemString
Suggested full path for the drawing.
bsDrwFilenameOverride
Type: SystemString
Return overridden full path for the drawing here; the file must be creatable. Or return empty string to cancel drawing creation. It both cases the function must return true.

Return Value

Type: Boolean
True if you want to override the bsDrwFilename with bsDrwFilenameOverride or to cancel drawing creation with empty bsDrwFilenameOverride, otherwise false.
Availability

CUSTOMTOOLS 2023 SP0


See Also