elmundo777
Automotive
Hello. Is there any way to determine the id of the document? or contact by window number?
For example, I have a product where other products and desks are nested. After renaming and saving, the last element of the collection is activated for me. I want to go back later. At the same time, other documents can be opened before this document or after it.
I am attaching a picture:
In my case, I save product2. Part1 is active at the end.
How do I reactivate product2 and all its contents?
I write in vb.net / C#.
I tried this option (VB.net language):
But I always get the error. Because "Catia.Documents.Item(first1).Activate()" activates documents from all opened, but not from current document (Product2 in the picture).
Is it possible to somehow remember the active document and then refer to it after all the operations performed?
It does not come out by name, because it is not known whether the user will change the name of the main product or not
Help me please!
For example, I have a product where other products and desks are nested. After renaming and saving, the last element of the collection is activated for me. I want to go back later. At the same time, other documents can be opened before this document or after it.
I am attaching a picture:
In my case, I save product2. Part1 is active at the end.
How do I reactivate product2 and all its contents?
I write in vb.net / C#.
I tried this option (VB.net language):
Code:
If List_indexes.Count <> 0
dim firstOrDefault = List_indexes.First()
Dim first1 = firstOrDefault+1 ' add +1 because list indexes starts from 0, Catia collection from 1
[b] Catia.Documents.Item(first1).Activate()[/b][u][/u]
End if
But I always get the error. Because "Catia.Documents.Item(first1).Activate()" activates documents from all opened, but not from current document (Product2 in the picture).
Is it possible to somehow remember the active document and then refer to it after all the operations performed?
It does not come out by name, because it is not known whether the user will change the name of the main product or not
Help me please!