BuildingTcl and the MacOS

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
Andrew
Posts: 12
Joined: Wed Apr 06, 2005 7:28 pm
Location: Arup

BuildingTcl and the MacOS

Post by Andrew »

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".
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

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
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Andrew
Posts: 12
Joined: Wed Apr 06, 2005 7:28 pm
Location: Arup

Post by Andrew »

I probably won't have time to work on this, but what makes you think that the mac doesn't like subfolders?

What are the routines that add the menu items to the menubar?
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

i don't know much about macs and how subfolders are defined....

startmenubar sets up the first menu
rebuildmenubar sets up the rest of the menu once the file is opened.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

once i can get the whole thing to work on windows i'll work on the other platforms.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Andrew
Posts: 12
Joined: Wed Apr 06, 2005 7:28 pm
Location: Arup

Post by Andrew »

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.
Post Reply