I need to select .csv file from BlockStyler dialog. I try to use NXOpen.BlockStyler.FileSelection
1) Create and save file, as in tkinter I can open file explorer, create the name of file and it will return full path to a new file. Then I can work with it in my code as I need. I don't know how to do it in BlockStyler.
I tried to use Tkinter fileopen, but the error was rised: "Can't find a usable init.tcl in the following directories... This probably means that Tcl wasn't installed properly."
2) Open file. Actually the same problems. And I don't understand how to set a "Filter" property for FileSelection.
Please, help me.
The block just returns what the user has selected like the regular FileOpen dialog available through regular .NET
The options of the file selection block are similar to the one of a FileOpen dialog.
Have you checked the block styler API reference in the NX documentation?
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0
How to Get the Most from Your Signature in the Community
NX BlockStyler and tkinter are two completely separate classes.
The BlockStyler file browser can only select existing files. It cannot be used to create a new filename.
To reference TK libraries from a Python journal, the TCL_LIBRARY environment variable must be set to the appropriate TCL installation. Note that this is not part of the NX Python distribution.