Skip to main content
13-Aquamarine
July 14, 2024
Solved

Trouble with while perform back to back ProSelect()

  • July 14, 2024
  • 1 reply
  • 917 views
 
// Set 1 : multi selection
int asm_prt_sels;
ProSelection *prt_asm_sel_array;
status = ProSelect("prt_or_asm",-1, NULL, NULL, NULL, NULL, &prt_asm_sel_array, &asm_prt_sels);  //set 1
ProSelection asm_prt_sels_copy;
status = ProSelectionCopy(prt_asm_sel_array[0], &asm_prt_sels_copy); //manual array number
 
// set 2 : single selection
ProSelection *asm_array;
int asm_sel;
status = ProSelect("prt_or_asm", 1, NULL, NULL, NULL, NULL, &asm_array, &asm_sel);  // set 2
ProSelection asm_sel_copy;
status = ProSelectionCopy(asm_array[0], &asm_sel_copy);
 
************************************************************************************************************************************************
Hi all,
 
Initally I tried to access set 1 array below after set 2, which  is not working. It works only when I put manal array number (prt_asm_sel_array[0]) with equivalant proselection copy, I can access successfully acess below to set 2.
 
But if user picks dynamic "n" number of set 1 selections , then how to access "n" number of equivalant proselection copy, below to set 2
 
Thanks.
Best answer by VA_3544793

Solved!! By converting set 1 ProSelection array into ProReference array at below of set 1 & again convert same ProReference array to ProSelection array below to set 2. so that set 1 selection array won't be replaced by set 2 selection array.

1 reply

VA_354479313-AquamarineAuthorAnswer
13-Aquamarine
July 14, 2024

Solved!! By converting set 1 ProSelection array into ProReference array at below of set 1 & again convert same ProReference array to ProSelection array below to set 2. so that set 1 selection array won't be replaced by set 2 selection array.