Skip to main content
14-Alexandrite
Oct 27, 2022 10:30 AM UTC
Solved

Change Component to User Defined Rep

Hi,

 

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

 

Thanks in advance.

FV_01
FV_01Answer
Oct 28, 2022 8:52 PM UTC

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()

 

2 replies

FV_01
FV_0117-PeridotAnswer
Oct 28, 2022 8:52 PM UTC

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()

 

Translate
Navku14-AlexandriteAuthor
14-Alexandrite
Nov 8, 2022 4:27 AM UTC

Hi,

 

Thanks for the reply.

 

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

 

Translate