How to invoke an external script file in the logic section

Discussions concerning programming of SOFTIMAGE©
jacobo
Posts: 41
Joined: 10 Jun 2009, 22:06

How to invoke an external script file in the logic section

Post by jacobo » 29 Apr 2013, 03:19

Hi;

I want to invoke the execution in an external script file in the logic section of a master script file in its logic section. How do I do it?

Instead of having to have this in my master script:

oLayout.Logic = "sub poTool_OnChanged" & vbCrlf & " PPG.Button.Value = Rnd" & vbCrlf & "end sub"

I want to have this read out from the external file:

sub poTool_OnChanged
PPG.Button.Value = Rnd
end sub



Cheers;

AJ

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

Re: How to invoke an external script file in the logic section

Post by xsisupport » 29 Apr 2013, 10:06

How about LogicFile?
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

jacobo
Posts: 41
Joined: 10 Jun 2009, 22:06

Re: How to invoke an external script file in the logic section

Post by jacobo » 30 Apr 2013, 19:06

Thankx a million Stephen, this is great... But my biggest problem is that I'm trying to code in VB (horrible, I know :-( ) I just couldn't get the syntax right... Isn't this the correct format for PPGLayout. SetAttribute?



set oPSet = ActiveSceneRoot.AddProperty( "CustomProperty", false, "ButtonExample" )

-----

set oLayout = oPSet.PPGLayout

-----

oLayout.SetAttribute "SiUILogicFile", "C:\Users\JACOBO\Desktop\BendArm.vbs" '<---Here's where I get an error...

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

Re: How to invoke an external script file in the logic section

Post by xsisupport » 30 Apr 2013, 19:10

jacobo wrote:Thankx a million Stephen, this is great... But my biggest problem is that I'm trying to code in VB (horrible, I know :-( ) I just couldn't get the syntax right... Isn't this the correct format for PPGLayout. SetAttribute?

Code: Select all

set oPSet = ActiveSceneRoot.AddProperty( "CustomProperty", false, "ButtonExample" )

-----

set oLayout = oPSet.PPGLayout

-----

oLayout.SetAttribute "SiUILogicFile", "C:\Users\JACOBO\Desktop\BendArm.vbs" ' Here's where I get an error...
Hi

I think it should be like this:

Code: Select all

oLayout.SetAttribute SiUILogicFile, "C:\Users\JACOBO\Desktop\BendArm.vbs"
or this:

Code: Select all

oLayout.SetAttribute "LogicFile", "C:\Users\JACOBO\Desktop\BendArm.vbs"
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage