Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AddiPartMember

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
oransen
373 Views, 2 Replies

AddiPartMember

In C++ can I use this function, using the key index Member string to select which row in the factory I want to insert?

 

In the docs all I see is

 

  1. Use an iPartTableRow (but no examples in C++).
  2. Use an index, this works but I need to know the index before using it.
  3. Use a set of parameters in a string (but "[Member=142314]" does not seem to work

Can I not simple use a string with the appropriate member?

 

 

Tags (1)
2 REPLIES 2
Message 2 of 3
adam.nagy
in reply to: oransen

Hi,

 

If you can do it in other languages, you can do it in C++ as well.

Did you test things in VBA? That's the simplest/quickest way to check how things work.

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 3
oransen
in reply to: adam.nagy

Ok, this works:

 

 

    CComPtr<TransientGeometry> pTransGeom = ...
    CComPtr<Matrix> pPosMatrix;
    pTransGeom->CreateMatrix(&pPosMatrix); // Defaults to 0 0 0

    CComPtr<ComponentOccurrence> pTroncOcc = nullptr ;
    CComBSTR bstrTronchettiFile (L"C:\\TEST\\TEST_IPART.ipt") ;
    CComBSTR bstrMember (L"30086486") ; // the Member value
    pOccurrencesList->AddiPartMember (bstrTronchettiFile,pPosMatrix,_variant_t(bstrMember),&pTroncOcc) ;

Either I've missed it but what seems to be missing in all the help files and examples is the fact that the penultimate parameter is (can be) the Member, pure and simple.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report