how to get the values of an instance through skill

N

noreply

Guest
Hi ,
I want to get the values of an instance through skill...say for eg., i
want to get the number of fingers or the length of each finger in an
instance through skill. how to proceed?

Please do comment on this...
regards,
Lokesh rajendran.
 
Hi Lokesh,

You may use the function cdfGetIstCDF to obtain the cdf info of an
instances.


Regards,
How
 
On Jun 17, 1:52 pm, "KB.How" <kianboon....@gmail.com> wrote:
Hi Lokesh,

You may use the function cdfGetIstCDF to obtain the cdf info of an
instances.

Regards,
How
Hi KB.How,
I tried the following code as per your suggestion:
myId=caar(geGetObjectSelectedSet());to get the object id
obj1=cdfGetInstCDF(myId)

after obtaining the properties of the instance in "obj1" ,i tried the
following:
obj1~>?parameters
and
obj1~>instParameters
but i dont know how to obtain the width/length info of the instance
from it..
could you please help..
Regards,
Lokesh rajendran.
 
On 17 Giu, 13:13, noreply <lokeshr...@gmail.com> wrote:
On Jun 17, 1:52 pm, "KB.How" <kianboon....@gmail.com> wrote:

Hi Lokesh,

You may use the function cdfGetIstCDF to obtain the cdf info of an
instances.

Regards,
How

Hi KB.How,
I tried the following code as per your suggestion:
myId=caar(geGetObjectSelectedSet());to get the object id
obj1=cdfGetInstCDF(myId)

after obtaining the properties of the instance in "obj1" ,i tried the
following:
obj1~>?parameters
and
obj1~>instParameters
but i dont know how to obtain the width/length info of the instance
from it..
could you please help..
Regards,
Lokesh rajendran.

cdfgData = cdfGetInstCDF(instance)
get_p = cdfFindParamByName(cdfgData "width")
width_v = get_p->value

Camelot
 
Hi,

I think what was meant was:
obj1_cdf=cdfGetInstCDF(myId)
then check:
ParNames = obj1_cdf~>parameters~>name
ParValues = obj1_cdf~>parameters~>value

to see all corresponding names & their values.
But if you need a code to derive it:
LengthParam = car( exists( X obj1_cdf~>parameters
X~>name=="length" ) )
Length = LengthParam~>value

Similarly with width.

Best Regards,
I-FAB
 
Hi Lokesh,


Try this ( similar with camerlot answer )

cdfId = cdfGetInstCDF(inst)
fingerLength = cdfFindParamByName(cdfId "fingerLength")~>value
fingerWidth = cdfFindParamByName(cdfId "fingerWidth")~>value


Let us know if you encounter any issue.

Regards,
How
 
Hi camelot,
the following was the code that i wrote based on your inputs....
Just giving the code in a form that worked for me....
And thanks a lot for your help.......

;the code gives the value of the parameters like width,length of the
instance etc.,
myId=caar(geGetObjectSelectedSet());to get the object id
cdfId = cdfGetInstCDF(myId)
getP = cdfFindParamByName(cdfgData "w")
;its highly recommended that you test the following
"cdfId~>parameters~>name" to know the exact string that has to entered
for the above command like "width" or "W"
myWidth = getP->value

Regards,
Lokesh rajendran




KB.How wrote:
Hi Lokesh,


Try this ( similar with camerlot answer )

cdfId = cdfGetInstCDF(inst)
fingerLength = cdfFindParamByName(cdfId "fingerLength")~>value
fingerWidth = cdfFindParamByName(cdfId "fingerWidth")~>value


Let us know if you encounter any issue.

Regards,
How
 
Hi I-fab and k-how,
The code that you gave is also wonderful and its working...
And thanks for posting the code. I'm just amazed by the way a single
goal is accomplished by different styles of writing code......
Regards,
Lokesh rajendran.


noreply wrote:
Hi camelot,
the following was the code that i wrote based on your inputs....
Just giving the code in a form that worked for me....
And thanks a lot for your help.......

;the code gives the value of the parameters like width,length of the
instance etc.,
myId=caar(geGetObjectSelectedSet());to get the object id
cdfId = cdfGetInstCDF(myId)
getP = cdfFindParamByName(cdfgData "w")
;its highly recommended that you test the following
"cdfId~>parameters~>name" to know the exact string that has to entered
for the above command like "width" or "W"
myWidth = getP->value

Regards,
Lokesh rajendran




KB.How wrote:
Hi Lokesh,


Try this ( similar with camerlot answer )

cdfId = cdfGetInstCDF(inst)
fingerLength = cdfFindParamByName(cdfId "fingerLength")~>value
fingerWidth = cdfFindParamByName(cdfId "fingerWidth")~>value


Let us know if you encounter any issue.

Regards,
How
 

Welcome to EDABoard.com

Sponsor

Back
Top