  | | | using The Dictionary on a Compiled operator?? | using The Dictionary on a Compiled operator?? 2004-02-23 - By Jose Luis Gomez
Back We're using version 3.5, but we've found a way to do it:
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- CStatus st;
CComAPIHandler myApp(app.GetRef()); CComAPIHandler myDic(myApp.GetProperty(L"Dictionary"));
CValue myObjVal; st = myDic.Call(L"GetObject",myObjVal,L"mySphere");
if(st == CStatus::OK) { X3DObject myx3dobj(myObjVal); CValue theRadius = myx3dobj.GetParameterValue (L"radius"); app.LogMessage(L"The radius: " + theRadius.GetAsText()); } -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
How it would be with the new "CRef::Set" method?? (just to know for the update momment...)
Thanks for your help
/Jose Gomez
Felix Gebhardt wrote:
>Which version of XSI are you using? There is a brand new method in 3.5.1 >just for that. > >CRef::Set(const CString&) > > >Cheers, >Felix > > > >Jose Luis Gomez wrote: > > >>Hi list, >>I have a scripted operator in which I'm getting the radius of a sphere >>called "mySphere" in the following way. >> >>sphereRadius = Dictionary.GetObject("mySphere").radius.value; >> >>Now I'm trying to do the compiled version of the operator in C++ but I >>don't know how I can get what i was getting with scripting... >> >>Any help?? >> >>Thanks in advance >> >>/Jose Gomez >> >>--- >>Unsubscribe? Mail Majordomo@(protected) with the following text in body: >>unsubscribe xsi >> >> > >--- >Unsubscribe? Mail Majordomo@(protected) with the following text in body: >unsubscribe xsi > >. > > >
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1"> <title></title> </head> <body text="#000000" bgcolor="#ffffff"> We're using version 3.5, but we've found a way to do it:<br> <br> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- <br> CStatus st;<br> <br> CComAPIHandler myApp(app.GetRef());<br> CComAPIHandler myDic(myApp.GetProperty(L"Dictionary"));<br> <br> CValue myObjVal;<br> st = myDic.Call(L"GetObject",myObjVal,L"mySphere");<br> <br> if(st == CStatus::OK)<br> {<br> X3DObject myx3dobj(myObjVal);<br> CValue theRadius = myx3dobj .GetParameterValue (L"radius");<br> app.LogMessage(L"The radius: " + theRadius.GetAsText());<br> }<br> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- <br> <br> How it would be with the new "CRef::Set" method?? (just to know for the update momment...)<br> <br> Thanks for your help<br> <br> /Jose Gomez<br> <br> <br> Felix Gebhardt wrote:<br> <blockquote type="cite" cite="mid003f01c3fa18$04c93480$8299fea9@(protected)"> <pre wrap="">Which version of XSI are you using? There is a brand new method in 3.5.1 just for that.
CRef::Set(const CString&)
Cheers, Felix
Jose Luis Gomez wrote: </pre> <blockquote type="cite"> <pre wrap="">Hi list, I have a scripted operator in which I'm getting the radius of a sphere called "mySphere" in the following way.
sphereRadius = Dictionary.GetObject("mySphere").radius.value;
Now I'm trying to do the compiled version of the operator in C++ but I don't know how I can get what i was getting with scripting...
Any help??
Thanks in advance
/Jose Gomez
--- Unsubscribe? Mail <a class="moz-txt-link-abbreviated" href="mailto:Majordomo @(protected)">Majordomo@(protected)</a> with the following text in body: unsubscribe xsi </pre> </blockquote> <pre wrap=""><!----> --- Unsubscribe? Mail <a class="moz-txt-link-abbreviated" href="mailto:Majordomo @(protected)">Majordomo@(protected)</a> with the following text in body: unsubscribe xsi
.
</pre> </blockquote> </body> </html>
|
|
 |