But when i try multiples views, it does not work. Can someone please help me how to adjust it for multiple views? I dont know Python very much. pic 2 with error
a = UnwrapElement(IN[0])
v = UnwrapElement(IN[1])
TransactionManager.Instance.EnsureInTransaction(doc)
for i in a:
i.ShowBubbleInView(DatumEnds.End0,v)
i.ShowBubbleInView(DatumEnds.End1,v)
TransactionManager.Instance.TransactionTaskDone()
At the moment your code is hard to read, as I have no idea what a and v are. Spell out variables using camelCase or some other standard format so that people an understand what you are working with.
But if I assume that v is your view, and a is your list of grids, then I can guess that you need to add a loop mechanism to your views so that it can iterate over all the views, and then iterate over all the grids in the view iterations.
something like:
for view in viewList:
for grid in gridList:
grid.ShowBubbleInView(DatumEnds.End0,view)
grid.ShowBubbleInView(DatumEnds.End1,view)