<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>That's exactly what I was looking for.</div><div><br></div><div>thanks a lot for the great support !!!</div><div><br></div><div><br></div><div><div>> Date: Mon, 30 May 2016 08:10:48 -0400<br>> Subject: Re: [Paraview] Save State/adding custom property<br>> From: utkarsh.ayachit@kitware.com<br>> To: michalwozniak@live.ca<br>> CC: paraview@paraview.org<br>> <br>> There's a preexisting feature called "annotation" that vtkSMProxy<br>> supports via the following API. Seems to me that'd map well to what<br>> you're trying to do with the "user" property.<br>> <br>> void SetAnnotation (const char *key, const char *value)<br>> const char * GetAnnotation (const char *key)<br>> void RemoveAnnotation (const char *key)<br>> void RemoveAllAnnotations ()<br>> bool HasAnnotation (const char *key)<br>> int GetNumberOfAnnotations ()<br>> const char * GetAnnotationKeyAt (int index)<br>> <br>> Utkarsh<br>> <br>> On Sun, May 29, 2016 at 1:37 PM, michal wozniak <michalwozniak@live.ca> wrote:<br>> > Hi everyone,<br>> ><br>> > I am trying to add a custom property to the state xml.<br>> ><br>> > For eg:<br>> ><br>> > I loaded object.stl and did a slice on it. Then, I saved the state and went<br>> > to look at the XML.<br>> ><br>> > <ProxyCollection name="sources"><br>> > <Item id="4031" name="Slice1"/><br>> > <Item id="3783" name="object.stl"/><br>> > </ProxyCollection><br>> ><br>> > I want to add an extra property called "user"<br>> ><br>> > <ProxyCollection name="sources"><br>> > <Item id="4031" name="Slice1" user="dev"/><br>> > <Item id="3783" name="object.stl" user="basic"/><br>> > </ProxyCollection><br>> ><br>> > the extra property will be added during the saving of the state. I will be<br>> > changing user property using a widget.<br>> > I just want to know how to send the value of my variable user to be printed<br>> > in the xml.<br>> ><br>> > I have been looking at a couple of classes vtkSMStateVersionController,<br>> > vtkSMStateLoader, vtkSMProperty.<br>> > I got confused after looking at so many classes related to this. Do i need<br>> > to register my variable or send it using a specific function?<br>> > Is there some documentation/tutorial for this?<br>> ><br>> > thanks<br>> ><br>> > Michal Wozniak<br>> ><br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the ParaView Wiki at:<br>> > http://paraview.org/Wiki/ParaView<br>> ><br>> > Search the list archives at: http://markmail.org/search/?q=ParaView<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://public.kitware.com/mailman/listinfo/paraview<br>> ><br></div></div> </div></body>
</html>