Skip to main content
13-Aquamarine
November 24, 2023
Question

Proannotationshow api showing status us pro_tk_invalid_matrix

  • November 24, 2023
  • 2 replies
  • 1064 views

Hi All,

 

I wanted to share that when using the ProAnnotationshow API to create drawing dimensions and providing axis is as a reference, the status is displayed as 'pro_tk_invalid_matrix.' Has anyone else encountered this?

please let me know, if anyone has the solution.

Thank you

2 replies

24-Ruby III
November 25, 2023

Article - "API ProDimensionAnnotationelemCreate() returns error "PRO_TK_INVALID_MATRIX" for specific driving dimensions in Creo Parametric through Toolkit": https://www.ptc.com/en/support/article/CS344762

RPN
18-Opal
November 26, 2023

Everything is explained in the header file. You can’t show a dimension in any orientation. There are a couple of rules.

 

extern ProError ProAnnotationShow (ProAnnotation* annotation, 
 ProAsmcomppath* comp_path, 
 ProView view);
/*
	Purpose: Sets an annotation to be shown. This changes the model 
	 database to show the annotation until it is explicitly 
 erased.

	Input Arguments:
		annotation - The annotation (note, gtol, surface finish, 
 symbol, ref. dim., driven dim, dimension). 
 <P>Note: regular dimensions may only be shown in a drawing.
		comp_path - The assembly component path. Applicable only 
 if view != NULL and the view contains an 
 assembly including the owner model of the 
 annotation. Pass NULL when not required.
		view - The drawing view. Pass NULL to toggle the 
 state in the solid model.

	Output Arguments:
		none
 
	Return Values:
		PRO_TK_NO_ERROR - The function succeeded.
		PRO_TK_BAD_INPUTS - One or more arguments was invalid.
		PRO_TK_NO_CHANGE - The annotation is already shown in the target model.
		PRO_TK_INVALID_MATRIX - The annotation cannot be shown due to orientation conflicts in the view.