Using PartList.Delete()

Using PartList.Delete()

1830108CDDDF
Contributor Contributor
658 Views
2 Replies
Message 1 of 3

Using PartList.Delete()

1830108CDDDF
Contributor
Contributor

Hello everyone.

I want to delete every parts list in each sheet of my drawing. Reading the API it says that PartList.Delete() is the method for this, but yet I'm not able to do this (I'm using the example for create parts list from the API as reference).

 

Thanks in advance, regardas.

0 Likes
Accepted solutions (1)
659 Views
2 Replies
Replies (2)
Message 2 of 3

A.Acheson
Mentor
Mentor
Accepted solution

Hi @1830108CDDDF 

Try this!

Dim DrawDoc As DrawingDocument = ThisDoc.Document
For Each Sht As Sheet In DrawDoc.Sheets
	For Each PL As PartsList In Sht.PartsLists
		PL.Delete
	Next
Next

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 3

1830108CDDDF
Contributor
Contributor

Works perfect! Thank you very much, have a nice day.

0 Likes