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: 

Drawing View Partslist BOM Type

1 REPLY 1
Reply
Message 1 of 2
NachitoMax
324 Views, 1 Reply

Drawing View Partslist BOM Type

Hi

 

if i copy a drawing view to a new drawing and run my routine to create a partslist on "Parts Only", it works just fine but if i run the same routine on the same drawing view in an existing drawing sheet, the partslist defers to a "Structured" view.

 

in code, how can i force a Parts Only partslist to be created?

 

i have tried enabling the Parts only like this-

       Dim sDoc As AssemblyDocument
       Set sDoc = ThisApplication.Documents.Open(omodelPath, True)

       Dim oBOM As bom
        Set oBOM = sDoc.ComponentDefinition.bom
        'component definition does not work

        ' Make sure that the structured view is enabled.
        oBOM.StructuredViewEnabled = False
        oBOM.PartsOnlyViewEnabled = True

        sDoc.Save2
        sDoc.Close

        Set sDoc = Nothing

 

This opens the drawing view reference and attempts to enable the BOM view but nothing works, i still get a structured parts list

 

Ideally, i would like to do this in the drawing sheet without opening the assembly

 

Thanks

 

Nigel

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


1 REPLY 1
Message 2 of 2
t_remal
in reply to: NachitoMax

Hello,

 

do you use PartsLists.Add in your routine that creates a partslist in the drawing? If so, do you set the third parameter to kPartsOnly?

For example:

oSheet.PartsLists.Add(oDrawingView, oPlacementPoint, kPartsOnly)

 

Regards,

Lubomir

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

Post to forums  

Autodesk Design & Make Report