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
Can I not simple use a string with the appropriate member?
Solved! Go to Solution.
Solved by oransen. Go to Solution.
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,
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.