Inserting/Adding all Balloons from Parts List

Inserting/Adding all Balloons from Parts List

Anonymous
Not applicable
415 Views
1 Reply
Message 1 of 2

Inserting/Adding all Balloons from Parts List

Anonymous
Not applicable

Hello,

I am automating my drawing and I couldnt find a way to add new balloons from my parts list into the drawing. I saw several posts that renumbers or finds which item is not ballooned but i was looking at adding balloons on a drawing without any initial balloons.

 

This is a section of the code I used but I couldnt not get past the [virtualcomponent as object] part:

'PARTS LIST
Dim oPartslist As PartsList
oPartslist = SSheet.PartsLists.Add(oPartDocS, oTG.CreatePoint2d(0.965, 26.828), PartsListLevelEnum.kFirstLevelComponents, , , False)

' Add balloon from parts list

Dim oObjBalloon As ObjectCollection
oObjBalloon = invApp.TransientObjects.CreateObjectCollection
Call oObjBalloon.Add(oTG.CreatePoint2d(22, 17))
Call oObjBalloon.Add(oTG.CreatePoint2d(20, 19.3))
Dim oBalloon As Balloon
oBalloon = SSheet.Balloons.Add(oObjBalloon, oPartslist.PartsListRows.Item(1))  ' This is where I think I have the virtual component not well defined

 

Could someone help please?

 

Thank you

0 Likes
416 Views
1 Reply
Reply (1)
Message 2 of 2

adam.nagy
Autodesk Support
Autodesk Support

Hi John,

 

Here is a sample that adds a balloon, though only temporarily in this case.

http://adndevblog.typepad.com/manufacturing/2013/11/get-itemnumber-from-the-drawingcurve.html

 

You just have to remove the

Call oTransaction.Abort

... part of the code.

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes