Skip to main content
14-Alexandrite
October 27, 2022
Solved

Change Component to User Defined Rep

  • October 27, 2022
  • 1 reply
  • 1184 views

Hi,

 

Can you suggest api to change component in assembly to user defined representation.

 

Thanks in advance.

Best answer by FV_01

Having ProAsmcomppath for a component and ProSimprep for a user defined representation.

 

  • get ProSimrepdata with ProSimprepDataGet()
  • get ProSimprepActionType type with ProSimprepdataDfltGet()
  • create a ProSimprepAction with the acquired type
  • create ProSimprepdataitem with  ProSimprepdataitemInit(), use component's ProAsmcomppath  values to fill function arguments
  • add item to a data structure with ProSimprepdataitemAdd()
  • set data with ProSImprepdataSet()
  • free data with ProSimprepdataFree()

 

1 reply

FV_0117-PeridotAnswer
October 28, 2022

Having ProAsmcomppath for a component and ProSimprep for a user defined representation.

 

  • get ProSimrepdata with ProSimprepDataGet()
  • get ProSimprepActionType type with ProSimprepdataDfltGet()
  • create a ProSimprepAction with the acquired type
  • create ProSimprepdataitem with  ProSimprepdataitemInit(), use component's ProAsmcomppath  values to fill function arguments
  • add item to a data structure with ProSimprepdataitemAdd()
  • set data with ProSImprepdataSet()
  • free data with ProSimprepdataFree()

 

Navku14-AlexandriteAuthor
14-Alexandrite
November 8, 2022

Hi,

 

Thanks for the reply.

 

The one I missed was ProSubstitutionInit to change user defined rep.