FLEXnet Licensing error:-1,359. System Error: 2 “No such file or directory”


This FLEXLM_DIAGNOSTIC error indicates that the @ symbol is missing. For example, you will see this error if setenv.bat has this:

set _ADSK_LicServers=mtl-licserver

instead of this;

set _ADSK_LicServers=@mtl-licserver

When there is no @ symbol, “mtl-licserver” is interpreted as a file path, not as the name of a computer. Softimage 7.5 used this syntax to specify that the file C:\Softimage\Softimage_7.5_x64\adlm\licenses\Autodesk.lic contained the location of the license server.

Here’s the actual FLEXLM_DIAGNOSTIC message. Notice how it lists “Filename” and “License path”, which indicate that Softimage is trying to find a file.

—————————
FLEXible License Manager
—————————
FLEXnet Licensing checkout error: Cannot find license file.
The license files (or license server system network addresses) attempted are
listed below. Use LM_LICENSE_FILE to use a different license file,
or contact your software provider for a license file.
Feature: 84000SFTIM_2010_0F
Filename: mtl-server
License path: mtl-server;
FLEXnet Licensing error:-1,359. System Error: 2 “No such file or directory”
For further information, refer to the FLEXnet Licensing documentation,
available at “www.acresso.com”.
—————————
OK
—————————

Getting ICE attributes through scripting


You can get at the ICE attributes of a point cloud through PointCloudGeometry.ICEAttributes or PointCloudGeometry.GetICEAttributeFromName.

To get the attribute values for every point in a point cloud, you get the DataArray of the attribute.

Here’s some sample JScript that shows how to get ICE attributes. Run it once, and then randomize the initial shapes of the particles and run the script again. See the difference? (Look at the difference in IsConstant and the contents of DataArray for the Shape attribute).

Remember that in the script editor you can double-click a method or property name (like “DataArray”) and press F1 to go to the SDK reference page.

var pc = Dictionary.GetObject( "PointCloud" );
var oPointCloudGeometry = pc.ActivePrimitive.Geometry;

// Get the NbPoints attribute
var oIceAttrib = oPointCloudGeometry.GetICEAttributeFromName( "NbPoints" );
logAttributeInfo( oIceAttrib );
logDataArray( oIceAttrib.DataArray );

// Get the Shape attribute
var oIceAttrib = oPointCloudGeometry.GetICEAttributeFromName( "Shape" );
logAttributeInfo( oIceAttrib );
logDataArray( oIceAttrib.DataArray );

// Utility functions
function logAttributeInfo( oIceAttrib )
{
    LogMessage( oIceAttrib.Name + "ICE attribute");
    LogMessage( "\tIsConstant=" + oIceAttrib.IsConstant );
    LogMessage( "\tContextType=" + oIceAttrib.ContextType );
    LogMessage( "\tDataType=" + oIceAttrib.DataType );
}

function logDataArray( dataArray )
{
    // DataArray is a safe array
    // So, convert it to a JScript array
    var a = new VBArray( dataArray ).toArray();
    LogMessage( "\tDataArray.length=" + a.length );
    for ( var i in a )
    {
        if ( typeof(a[i])=="object" )
        {
            LogMessage( "\tDataArray["+i+"].Type=" + a[i].Type );
			LogMessage( ClassName( a[i] ) );	// Shape
        }
        else
        {
            LogMessage( "\tDataArray["+i+"]=" + a[i] );
        }
    }
}

Firewall, ports, and licensing


Autodesk licensing uses the ports 2080 and 27000-27009, so check that your firewall does not block these ports. Check the firewalls both on the workstations and on the license server.

If 2080 is blocked, you’ll see this error in the FLEXLM_DIAGNOSTICS output:

FLEXnet Licensing error:-15,570. System Error: 10035 “WinSock: Operation would block”

Passing a safe array into a method from JScript


In the XSI SDK, when a method or command returns an array, it returns a safe array.
So, in JScript, you have to use VBArray.toArray() to convert the safe array to a JScript array.

When you go in the other direction, and pass in an array, the XSI SDK automatically converts the JScript array to a safe array. That’s good, because you can’t build safe arrays in JScript, or convert JScript arrays to safe arrays.

Unfortunately for me, a customer came across a case where PPGItem.SetAttribute wouldn’t work with a JScript. Sure, it was with an undocumented attribute, but still…

I knew the JScript attribute was the problem because I could set the attribute in VBScript, but not JScript.

So I came up with a hack to get a safe array in JScript. I used ExecuteScriptCode to call a VBScript function that returned a safe array, which I could then pass to SetAttribute.

var s = "function a( val )\n" + 
	"a = Array( val )\n" +
	"end function";

var sa = Application.ExecuteScriptCode( 
			s, "VBScript", "a", val );

Another way to get a safe array in JScript is to use the Scripting.Dictionary. The Items method returns a safe array:

d = new ActiveXObject("Scripting.Dictionary"); 
d.Add( 0, val )
var sa = d.Items();

Changing the vendor port number from 2080


A network license (.lic) file includes this line

VENDOR adskflex port=2080

which suggests [to me] that you can change the port number.

So I changed the port number in the .lic, saved the file, and restarted the license server.
But adskflex still used 2080:

8:33:58 (lmgrd) License file(s): C:\Program Files\Autodesk Network License Manager\SFTIMA2010.lic
8:33:58 (lmgrd) lmgrd tcp-port 27000
8:33:58 (lmgrd) Starting vendor daemons ... 
8:33:58 (lmgrd) Starting vendor daemon at port 2080
8:33:58 (lmgrd) Using vendor daemon port 2080 specified in license file

That last log entry “Using vendor daemon port 2080 specified in license file” makes it look like I didn’t save my changes, but I know I did. My license file says 2082, not 2080.

After a little research, I found this KB article, which explains that the port 2080 is officially registered to Autodesk through the IANA, and you should “reassign the port in the conflicting application, or unblock the port”.

If for some reason you must use a different port, delete the “port=2080” from your license file. The adskflex vendor daemon will automatically find an available TPC/IP port.

Checking for Character Key Sets part 3


We’ve already seen two ways to get at the IsCharacterKeySet parameter: 1) using the GetValue command, and 2) using XSICollection.Items.

Now, here’s a third way, using Dictionary.GetObject(). Dictionary.GetObject takes a string name and returns the corresponding object:

var oProp = Selection(0);
var oParam = Dictionary.GetObject( oProp + ".IsCharacterKeySet" );
LogMessage( oParam.Value );

So what’s the best way to get IsCharacterKeySet? One thing to consider is that GetValue and Dictionary.GetObject both fail if the string does not resolve to an object. XSICollection.Items, on the other hand, won’t fail; you just have to check the .Count property after to see whether you got the parameter.

Using the Modulo node


The Modulo operation gives the remainder after division. For example, 14 modulo 12 gives you 2, because 12 goes into 14 once, with 2 left over.

You can use the Modulo node to generate a sequence of numbers that continually wraps around. For example, the sequence 0,1,2,0,1,2,0,1,2,… is the result of applying “modulo by 3” to the sequence 0,1,2,3,4,5,6,7,8,…

0 = 0 modulo by 3
1 = 1 modulo by 3
2 = 2 modulo by 3
0 = 3 modulo by 3
1 = 4 modulo by 3
2 = 5 modulo by 3
0 = 6 modulo by 3

In an ICE tree, you could use Modulo to sequentially assign instances from a group:

Modulo_InstanceShape1

You could also use Modulo to do something to every Nth particle. For example, in the “modulo by 3” sequence “0,1,2,0,1,2,0,1,2,…”, note that every third number is a “2”. So if you wanted to do something to every third particle, you would set up this ICE tree:

Modulo_Every3rd

Modulo arithmetic is sometimes called “clock arithmetic”. Consider that when you add 5 hours to 9am, you end up with 2pm, which is an example of modulo 12 arithmetic:

9:00 + 5 hours = 2:00
9 + 5 = 2
2 = 14 modulo by 12 (12 goes into 14 once, with 2 left over)

Here’s some visual displays of modular arithmetic.

Fixes in Softimage 2010 SP1


Here’s a summary of what’s in SP1:

  • Face Robot on Linux Face Robot now works on Linux! As well, many fixes have been made to Face Robot.
  • Crosswalk 4.1 Softimage 2010 SP1 ships with Crosswalk v.4.1. The main purpose of the Crosswalk update is to support the Softimage Face Robot plug-in on Linux 64-bit systems. There were also a few other important fixes thrown in for good measure.
  • Particle Volume Shader Many fixes have been made to the Particle Volume shader. Note that this also affects the Particle Renderer shader compound which uses this shader.
  • Hair Many fixes have been made to hair on Linux.

For the full list of fixes in SP1, see the readme.

Softimage 2010 SP1 is now available


To all Softimage 2010 customers.

Softimage 2010 SP1 is complete, separate installation. You don’t have to remove Softimage 2010 first.
SP1 will install in its own folder, and create its own User location.

SP1 runs using your existing 2010 license.

If you have a network license:
When you install 2010 SP1, enter the product key 591B1 and the serial number 000-00000000.

If you have a standalone license:
When you install 2010 SP1, enter the product key 590B1 and your 2010 serial number.

Using WScript.Shell to get environment variables


The docs say that XSIUtils.Environment gets system environment variables, but I think it is more accurate to say that it returns env vars of the XSI.exe process.

WScript.Shell is another way to get at the environment variables. The WshShell object’s Environment property is a collection of environment variables. For example, this snippet shows how to create a WScript.Shell object, and then check the value of the TEMP environment variable. Note that XSI.exe creates its own folder under the location pointed to by the User TEMP environment variable.

// Get WshShell object.
var oWshShell = new ActiveXObject ("WScript.Shell");

var oEnv = oWshShell.Environment("Process");
LogMessage( oEnv("TEMP") );

// INFO : C:\Users\blairs\AppData\Local\Temp\XSI_Temp_17480

var oEnv = oWshShell.Environment("User");
LogMessage( oEnv("TEMP") );
LogMessage( oWshShell.ExpandEnvironmentStrings("%USERPROFILE%") );

// INFO : %USERPROFILE%\AppData\Local\Temp
// INFO : C:\Users\blairs

You can also loop over the collection:

var oEnv = oWshShell.Environment("System");
logenv( oEnv );

function logenv( o )
{
	oEnum = new Enumerator( o ) ;
	for (;!oEnum.atEnd();oEnum.moveNext() )
	{
		var oSelItem = oEnum.item() ;
		LogMessage( oSelItem  );
	}
}