BuildingTcl and the MacOS
Moderators: silvia, selimgunay, Moderators
BuildingTcl and the MacOS
I am waiting for IT at work to install Tcl/Tk, so instead I have tried to use BuildingTcl on my MacBookPro.
This posting is mostly about documenting my experience in case anyone else wants to try it.
I have modified the following scripts to make them point to the right folders, I have added the directory containing the OpenSees executables to the path, and I have managed to start BuildingTcl.
myBuildingTcl.tcl
myBuildingTclViewer.tcl
I copied the above files into a new directory (do I have to do that?), and I then ran the following command from that directory:
OpenSeesTk <BuildingTcl_scripts_directory_path>/myBuildingTclViewer
A window then appeared for the OpenSeesTk application. Unfortunately it is too large for my screen, but I think I can see everything that I need to. The menubar initially only has three menu items: OpenSeesTk, File & Help. I then went to File | Load, and I opened GettingStartedDataFile.tcl. At this point an additional item was added to the main menu - "Input", and the "Analysis" options appeared in the window. I selected a model and two load combinations. Since there was no "Analysis" menu item, I clicked on the "Analyze" button at the bottom of the page. At this point the analysis started and the frame appeared followed by some graphs.
At the end, I wasn't sure what to do, as there was no "Results" menu item (and no "Analysis" one either). Any idea why this might be the case? I wonder whether it is a problem with the Mac version of the OpenSeesTk executable?
Using the "Input" menu, I am able to look at Material definitions etc. Under the Help menu, there are subfolders for "Templates", OpenSees Models" and "Reference". If I select "About", I get an error, complaining that it "can't read Frame3Path, no such variable".
This posting is mostly about documenting my experience in case anyone else wants to try it.
I have modified the following scripts to make them point to the right folders, I have added the directory containing the OpenSees executables to the path, and I have managed to start BuildingTcl.
myBuildingTcl.tcl
myBuildingTclViewer.tcl
I copied the above files into a new directory (do I have to do that?), and I then ran the following command from that directory:
OpenSeesTk <BuildingTcl_scripts_directory_path>/myBuildingTclViewer
A window then appeared for the OpenSeesTk application. Unfortunately it is too large for my screen, but I think I can see everything that I need to. The menubar initially only has three menu items: OpenSeesTk, File & Help. I then went to File | Load, and I opened GettingStartedDataFile.tcl. At this point an additional item was added to the main menu - "Input", and the "Analysis" options appeared in the window. I selected a model and two load combinations. Since there was no "Analysis" menu item, I clicked on the "Analyze" button at the bottom of the page. At this point the analysis started and the frame appeared followed by some graphs.
At the end, I wasn't sure what to do, as there was no "Results" menu item (and no "Analysis" one either). Any idea why this might be the case? I wonder whether it is a problem with the Mac version of the OpenSeesTk executable?
Using the "Input" menu, I am able to look at Material definitions etc. Under the Help menu, there are subfolders for "Templates", OpenSees Models" and "Reference". If I select "About", I get an error, complaining that it "can't read Frame3Path, no such variable".
wow, that's really cool!!
i think the results don't appear because recorders are defined in subfolders, which i think is what the mac doesn't like.
look at the addrecorders.tcl file.
and the processdata.tcl
i think the results don't appear because recorders are defined in subfolders, which i think is what the mac doesn't like.
look at the addrecorders.tcl file.
and the processdata.tcl
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
The Mac OS is based on the Mach kernel, which is derived from BSD Unix and NextStep, and I would have thought that Tcl/Tk code would work well with Unix-related systems. At the command line, creating folders/directories is the same as MS-DOS: mkdir newfolder.
Perhaps the main strange thing about the Mac is the fact that the main menubar for each application sits on the main menubar, rather than being attached to a window. I note that many X-window applications on the Mac follow the normal Unix/Windows convention of having the main application menubar on the window itself. When you do look at the Mac version, perhaps you need to find a way of putting the menu onto your window rather than it sitting on the main menubar (although you probably still need to have the "File" and "Help" menu items there.
Perhaps the main strange thing about the Mac is the fact that the main menubar for each application sits on the main menubar, rather than being attached to a window. I note that many X-window applications on the Mac follow the normal Unix/Windows convention of having the main application menubar on the window itself. When you do look at the Mac version, perhaps you need to find a way of putting the menu onto your window rather than it sitting on the main menubar (although you probably still need to have the "File" and "Help" menu items there.