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
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.
Seems that it does not work.
The value returned is an integer (with a string you get a type mismatch)
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");
Ha yes, return is an integer. The result is on the namespace!
thank you
I will test it and I come back !
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 ?
Ok Ok ....I asked Gwénael to do it for me :S
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.
If someone has a good sample script, please forward it to me so that it is added to the online help.
Thanks in advance
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


