Skip to main content
1-Visitor
April 12, 2024
Question

Pro/toolkit : ProAssemblyAutointerchange change subassm to a prt,PRO_TK_GENERAL_ERROR

  • April 12, 2024
  • 1 reply
  • 693 views

 

 

	int* ids = nullptr;
	ProArrayAlloc(1, sizeof(int*), 1, (ProArray*)&ids);
	ProArraySizeSet((ProArray*)&ids, 1);
	ids[0] = 40;
	int wHandle;
	if (ProWindowCurrentGet(&wHandle) == ProError::PRO_TK_NO_ERROR)
	{
		ProMdl handle;
		if (ProWindowMdlGet(wHandle, &handle) == ProError::PRO_TK_NO_ERROR && handle != 0)
		{
			ProMdl prdMdl;
			ProMdlLoad((wchar_t*)L"prtpath", PRO_MDL_UNUSED, PRO_B_FALSE, &prdMdl);

//the function can't work on asm->prt
//asm->prt is work
			ProAssemblyAutointerchange(ProMdlToAssembly(handle), ids, prdMdl);
		}
	}

	
	ProArrayFree((ProArray*)&ids);​

 

 

1 reply

5-Regular Member
April 17, 2024

Hi WR_10374309

Thank you for your question.

I encourage you to bring more details and context to your initial inquiry. This will make it easier for you to receive meaningful help from other Community members.