Showing results for 
Search instead for 
Do you mean 
Reply

what is the purpose of Source User's Tcl & why & when to use it ?

what is the purpose of Source User's Tcl & why & when to use it ?

 

Thanks

6 REPLIES

Re: what is the purpose of Source User's Tcl & why & when to use it ?

[ Edited ]

User tcl file would be a way to add some common code across posts (for one thing.) You can make a file - put a proc in it - source the file in all posts - and have that proc do the same thing in all posts and change it in one place. It also allows override of functionality. You don't ever have to use it. You could "expose" a proc (uplevel) in start of program. Or - regarding sourcing - it can be done at any point in post execution. Using the postbuilder "User source" feature is kind of handy because it happens as a last step in initial read through the post tcl - before any execution has begun.

NX10.03
Windows 7 Pro

Re: what is the purpose of Source User's Tcl & why & when to use it ?

The other nice thing about "source"ing in files -

You don't get all those syntax errors from PB when you save.

Especially the spurious ones (that aren't really errors) (although I think Siemens has mostly fixed this issue?)

(of course, then you find the errors when you post ;-)

"NX Log File" is now (NX10) a button on my left border bar in CAM :-)

 

Ken

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: what is the purpose of Source User's Tcl & why & when to use it ?

If your talking about the toggle in post builder under output settings then that is something I would never use. From what I remember post builder never saved or updated the users tcl file if something changed. Your better off using the source and uplevel tcl commands as stated above.

Using NX 8.0.3.4

Re: what is the purpose of Source User's Tcl & why & when to use it ?

Yes, Output settings -> Other options -> "User tcl source" block.

I use it in EVERY post.**

But yes, that file has to be edited outside PB (which, to me, is a good thing)

Using Notepad++ & the customizations (posted somewhere in the community, seatch for notepad++) for NX, I find it incredibly useful

 

** Except the posts that I point the template_post.dat at the "user" tcl file, and then the user tcl file sources in the tcl file created by PB.

 

Ken

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: what is the purpose of Source User's Tcl & why & when to use it ?

that changed my opinion, I guess it all depends how you use things.

Using NX 8.0.3.4

Re: what is the purpose of Source User's Tcl & why & when to use it ?

Useful or not, it's all relative. It's a rope. If you really "know" Tcl well, it'll help you to climb over the top, or you may just get strangled.  PB does not process this file.  When you do have error in it; you are on your own.

Learn online





Solution Information