Getting help

There are a number of commands available in order to create and edit stackups. The names of these commands can be easy to forget. Fortunately there is an aid to easily recall these commands. In order to demonstrate this we'll create an empty Stacks object and create one Stack object within it.

In [9]:
from stackups import *   # start up the stackups program

s = Stacks()   # create a Stacks object.

s.append(Stack())  # created the first Stack object, s[1], within s
Stacks title: None

[1] Stack title: None
r su  σ  j     d       dt     pn & n

The empty Stacks object was stored to the variable s. To see a list of the methods associated with s use the help method of s. (A method is special name for a function attached to an object.)

In [10]:
   append  a  Append a Stack to a Stacks object or a Stackunit ot a Stack.
   extend  e  Same as above, but append multiple objects simultaneously.
   insert  i  Insert a Stackunit into the middle of a Stack.
   search  o  Search for a part no., description, dimension, etc.
   update  u  Update a dimension, tolerance, part no, etc. of a Stackunit.
   invert     Put a Stack in reverse order
   jog     j  Change the direction of a Stackunit within a particular Stack.
   load       Load stored stackup data into memory for editing.
   move    m  Move a Stack within a Stacks object or a Stackunit within a Stack.
   pop        The same as pop in a regular Python list.
   renamepn   Rename all occurances of a pt. no. to a new pt. no.
   save       Save to a data file or to a report file (extension: stk or txt)
   su         Return a dictionary of su values (ints) and their titles.
   sync       Synchronize data.  (this is run automatically.)
   title      Set the title for a Stacks object or for a Stack object.
   titles     Show the title of every stack
   tolist     Converts a Stacks or Stack object to a list object.
   whereused  wu  Show in what Stacks that Stackunits are used.

Methods only available for Stack objects are: invert, jog, and update.
Shortcut keys are a, e, i, o, etc.  The action a method performs depends whether
a Stack or Stacks object calls it.  To obtain more specific info about a method:

>>> help(Stacks.append)

or for a Stack object:

>>> help(Stack.append)

Alter output (e.g. unit decimal places), via Stacks' settings function:

>>> settings()

One of the methods is title. Let's see more about this method.

In [11]:
Help on method title in module stackups:

title(t=None) method of stackups.Stacks instance
    Set the title for a Stacks object.
    t : str
        title for the Stacks object
    stks.title('My title for the Stacks object')

Following the example, we'll assign a title to s.

In [12]:
s.title('Project xyz stackups')
Project xyz stackups

[1] Stack title: None
r su  σ  j     d       dt     pn & n

Entering s.title('Project xyz stackups') assigned the title. Entering s showed the result. Let's assign a title to the first Stack (which contains no dimensions).

In [13]:
s[1].title('Clearance for gear on shaft #1')
Project xyz stackups

[1] Clearance for gear on shaft #1
< Previous | Next >