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: 

C++ call to put_DefaultRow

1 REPLY 1
Reply
Message 1 of 2
oransen
230 Views, 1 Reply

C++ call to put_DefaultRow

I can't find any C++ sample of calls to put_DefaultRow for an iPartFactory.

 

What I'm not sure about is the correct type of the argument, presumably a string...

    CComPtr<iPartFactory> piPartFactory = nullptr ;
    pPartCompDef->get_iPartFactory (&piPartFactory) ;
    piPartFactory->put_DefaultRow (...?...)

 

1 REPLY 1
Message 2 of 2
philippe.leefsma
in reply to: oransen

Hi

 

Sorry that I don't have a C++ sample ready to provide, but the default row argument is an iPartTableRow. Here is a VBA sample:

 

Public Sub DefaultRow()

    Dim doc As PartDocument
    Set doc = ThisApplication.ActiveDocument
    
    'Back up the current DefaultRow
    Dim row As iPartTableRow
    Set row = doc.ComponentDefinition.iPartFactory.TableRows(1)
    
    'Execute some code...
    
    'Re-set the default row
    doc.ComponentDefinition.iPartFactory.DefaultRow = row

End Sub

Regards,

Philippe

______________________________________________________________

If my post answers your question, please click the "Accept as Solution"

button. This helps everyone find answers more quickly!

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report