Help for new mode Window("GetCollection",NameSpace)

11 Posts
5 Users
0 Likes
63 Views
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi all

In PcVue 12 the new mode Window("GetCollection",NameSpace) is not in the help.

I saw on the forum some reply about it but is there any documentation for it ?

What is the return of this mode : XML string ?

Thanks a lot

 
Posted : 20/08/2019 2:40 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Indeed, it is not in the Help. I will create the SPR for that.

To answer your question, yes, the return is an XML string. You can manipulate it by using the Instruction XMLPATH.
I dont have any example with me but I am pretty sure Anna has it.

 
Posted : 20/08/2019 3:03 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Seems that it does not work.

The value returned is an integer (with a string you get a type mismatch)

 
Posted : 20/08/2019 5:02 pm
ANSO
 ANSO
(@a-solovevaarcinfo-com)
Posts: 16
Eminent Member
 

Hello,
I attached a test project from SPR. There are more code with XMLPATH.
But the function Window(Getcollection) was changed after the SPR was created so you don't need SEQ_buffer ()

The code should be

Window("GETCOLLECTION","CTX1");
'Do NOT needed anymore-> SEQ_BUFFER("INSERTFIELD", 1, hbuffer, "", Window("GETCOLLECTION"))
Print("count from function-",XMLPATH("COUNT", "CTX1","Mimics/Mimic"));
@xml.count1 = XMLPATH("GETSTR", "CTX1","Mimics/Count[1]");
Print("count from XLM- ",XMLPATH("GETSTR", "CTX1","Mimics/Count[1]"));
Count = XMLPATH("COUNT", "CTX1","Mimics/Mimic");

 
Posted : 22/08/2019 7:48 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Ha yes, return is an integer. The result is on the namespace!

 
Posted : 23/08/2019 5:20 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

thank you

I will test it and I come back !

 
Posted : 23/08/2019 5:39 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hello all,

Thanks for the example it's more usefull with it.

One more question, what are the different properties of each Mimic that this verb can return ?
In the example, proprerties returns are Name, Branch, Top, Left, Height, Width, Index, Refset, Region, Popup and Cache. Is there any others properties like Title that can be get ?

 
Posted : 23/08/2019 7:41 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Ok Ok ....I asked Gwénael to do it for me :S

 
Posted : 23/08/2019 9:20 pm
(@n-demirdjianarcinfo-com)
Posts: 3
New Member
 

Hello,

You can retrieve the following properties : Name, Branch, Index, Left, Top, Height, Width, ParentMimicName, ParentMimicBranch, Refset, Region, Popup, cache

We can easily add other properties to this XML buffer if needed

Cheers

N.

 
Posted : 29/08/2019 10:16 pm
b.lepeuple
(@b-lepeuplearcinfo-com)
Posts: 149
Estimable Member
 

If someone has a good sample script, please forward it to me so that it is added to the online help.

Thanks in advance

 
Posted : 30/08/2019 12:35 pm
(@admin_doc72)
Posts: 493
Member Admin
Topic starter
 

Hi

Written by Gwénael Coquet. thanks to him

Sub ListSynoOuvert()
DIM Count As Integer;
DIM i AS INTEGER;
DIM CPATH as Str;

Window("GETCOLLECTION","CTX1");

'Récupère le nombre de synoptique actuellement ouvert
Count = XMLPATH("COUNT", "CTX1","Mimics/Mimic");
Print("Le nombre de synoptiques ouverts : ",Count);

'Liste les synoptiques ouverts
for (i=1; i<=Count;i++)
print("*******************************");
'Récupération du nom du synoptique
CPATH=FORMAT("Mimics/Mimic[%i]/Name[1]",i);
print("Mimic name - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la branche du synoptique
CPATH=FORMAT("Mimics/Mimic[%i]/Branch[1]",i);
print("Branch - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la position gauche du synoptique
CPATH=FORMAT("Mimics/Mimic[%i]/Left[1]",i);
print("Left - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la position Haut du synoptique
CPATH=FORMAT("Mimics/Mimic[%i]/Top[1]",i);
print("Top - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la hauteur du synoptique
CPATH=FORMAT("Mimics/Mimic[%i]/Height[1]",i);
print("Height - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la largeur du synoptique
CPATH=FORMAT("Mimics/Mimic[%i]/Width[1]",i);
print("Width - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération du nom du synoptique Parent
CPATH=FORMAT("Mimics/Mimic[%i]/ParentMimicName[1]",i);
print("ParentMimicName- ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la branche du synoptique Parent
CPATH=FORMAT("Mimics/Mimic[%i]/ParentMimicBranch[1]",i);
print("ParentMimicBranch - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération du jeu de reference
CPATH=FORMAT("Mimics/Mimic[%i]/Refset[1]",i);
print("Refset - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération de la région d'ouverture
CPATH=FORMAT("Mimics/Mimic[%i]/Region[1]",i);
print("Region - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération info popup
CPATH=FORMAT("Mimics/Mimic[%i]/Popup[1]",i);
print("Popup - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération info cache
CPATH=FORMAT("Mimics/Mimic[%i]/cache[1]",i);
print("cache - ",XMLPATH("GETSTR","CTX1",CPATH));

'Récupération index
CPATH=FORMAT("Mimics/Mimic[%i]/index[1]",i);
print("index - ",XMLPATH("GETSTR","CTX1",CPATH));

Next

End Sub

 
Posted : 30/08/2019 8:03 pm