cancel
Showing results for 
Search instead for 
Did you mean: 

extending Tcl Interpreter

Pioneer
Pioneer

Hello all:

 

There is a cryptic reference in the post help files that says the Tcl interpreter can be extended using the configuration file metalanguage. It says there is an example, but the link just loops back to the same page. Can the Tcl interpreter be extended, and how?

 

Dan

20 REPLIES

Re: extending Tcl Interpreter

Extended in what way... are you talking about adding packages, or updating it to tcl 8.6? The packages can be added programmatically, the tcl base stuff is the only thing that isn't something that you can just throw in on the fly.

Jake Hardwick
CNC Programmer
Senior Aerospace AMT
Production NX8.5.3.3 Beta testing NX10.0.1.4

Re: extending Tcl Interpreter

Pioneer
Pioneer

I've tried to add packages, but all I get is error messages and there is no documentation in the help files

 

Re: extending Tcl Interpreter

Pioneer
Pioneer

Actuall, more specifically, if I write 

 

package requrire xxx

 

in post builder, post builder complains it cannot find the package. I've tried putting it everywhere I can think of to no avial.

 

Dan

Re: extending Tcl Interpreter

Have you looked at MOM_run_user_function?

Mark Rief
Retired Siemens

Re: extending Tcl Interpreter

you need to source in the package.  it should have a tcl file with something like this at the start of it:

 

package require Tcl 8.2
# When this version number changes, update the pkgIndex.tcl file
# and the install directory in the Makefiles.
package provide something 0.4.6

namespace eval ::tcl { 
   blah blah blah code and stuff here

}
Jake Hardwick
CNC Programmer
Senior Aerospace AMT
Production NX8.5.3.3 Beta testing NX10.0.1.4

Re: extending Tcl Interpreter

PLM World Member Legend PLM World Member Legend
PLM World Member Legend
It would be nice if siemens would get rid of the ancient tcl code. It's unfriendly in code and in debugging. Come on, get postbuilder into the the 21 century.
Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.1

Re: extending Tcl Interpreter

They are only 6 versions behind on TCL.  It would be very nice to be able to use the string isxxx command to see if the variable is set as floating point, integer, alphanumeric, etc...

 

One of my projects is to see the feasibility of putting the TCL 8.6 as a package in postbuilder.  If you look at the help page for the two versions:

 

tcl_commands.png

Jake Hardwick
CNC Programmer
Senior Aerospace AMT
Production NX8.5.3.3 Beta testing NX10.0.1.4

Re: extending Tcl Interpreter

Pioneer
Pioneer

Any clue who the current development team is on the post side of NX?

 

Dan

Re: extending Tcl Interpreter

Phenom
Phenom

There is a new post system coming out "post configurator".  I haven't been able to figure out much about that system - but I think they are saying that it is built on tcl - maybe the same tcl. 

My impression is that they would expect people to use tcl at a minimum for post building - and rely on post builder. Having the ability to do things in a cleaner and more elegant way (in tcl) probably is not a priority - especially for code work with postbuilder/nx post which may soon be considered legacy for post building.

NX10.03
Windows 7 Pro

Learn online





Solution Information