Getting Values on ICE Ports

Discussions concerning programming of SOFTIMAGE©
User avatar
gustavoeb
Moderator
Posts: 587
Joined: 20 Jul 2010, 22:33
Skype: gustavoboehs

Getting Values on ICE Ports

Post by gustavoeb » 25 Mar 2012, 23:15

Hello,

I'm trying to get some values from ICE Ports through Python without success.

When I try to get values from a Node like this:

Code: Select all

oNode = Application.GetValue("Object.pointcloud.ICEtree.Node01.Name")
Everything runs fine.

But if I try to get values from on of the node's port, like this:

Code: Select all

oPortConnection = Application.GetValue("Object.pointcloud.ICEtree.Node01.Port01.IsConnected")
I get an error... Does not matter what value I try to get.

Any ideas?
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: Getting Values on ICE Ports

Post by xsisupport » 25 Mar 2012, 23:18

get the node, and then check the IsConnected property

Code: Select all

var oNode = Dictionary.GetObject( "pointcloud.pointcloud.ICETree.Emit_from_Position" )
LogMessage( oNode.IsConnected )
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: Getting Values on ICE Ports

Post by xsisupport » 26 Mar 2012, 10:46

The difference is that I get an object (oNode) and then access a property (IsConnected) of that object using the Object Model dot notation (Object.Property).

In your SetValue call, you have a string "Object.Property".

SetValue and GetValue support that kind of string expression for certain properties and parameters (primarily stuff defined in SPDL), but not, in general, for Object Model properties.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 20 Jul 2010, 22:33
Skype: gustavoboehs

Re: Getting Values on ICE Ports

Post by gustavoeb » 26 Mar 2012, 14:20

IT WORKS! :ymhug:

was not aware of either Dictionary or GetObjet. Thank you very much sir. ^:)^
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/