You are on page 1of 130

FrameWorks Plus

Programmer's Reference

Version 2011 (V12)


June 2011
DFWP3-PE-200004H

Copyright
Copyright 1991-2011 Intergraph Corporation. All Rights Reserved.
Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement;
contains confidential and proprietary information of Intergraph and/or third parties which is protected by copyright law, trade secret
law, and international treaty, and may not be provided or otherwise made available without proper authorization from Intergraph
Corporation.
Code parameter descriptions for the ASD9, BS5950, LRFD1, NR83, and Tower2 codes are pulled directly form the GTSTRUDL
User's Guide, Revision N copyright 1978, 1988, 1989, 1990, 1991 by Georgia Tech Research Corporation, Georgia Institute of
Technology, Atlanta, Georgia 30332-0355. Used with permission.
Code parameter descriptions for the AISC-ASD and AISC-LRFD codes are pulled directly from the STAAD-III Reference Manual,
copyright 1995 by Research Engineers, Inc. 22700 Savi Ranch, Yorba LInda, California 92687-4608. Used with permission.

U.S. Government Restricted Rights Legend


Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was
developed at private expense and is "restricted computer software" submitted with restricted rights in accordance with
subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal
Acquisition Regulations ("FAR") and its successors, and is unpublished and all rights are reserved under the copyright laws of the
United States. For units of the Department of Defense ("DoD"): This is "commercial computer software" as defined at DFARS
252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3.
Unpublished - rights reserved under the copyright laws of the United States.
Intergraph Corporation
P.O. Box 240000
Huntsville, AL 35813

Terms of Use
Use of this software product is subject to the End User License Agreement ("EULA") delivered with this software product unless the
licensee has a valid signed license for this software product with Intergraph Corporation. If the licensee has a valid signed license
for this software product with Intergraph Corporation, the valid signed license shall take precedence and govern the use of this
software product. Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives licensee
permission to print a reasonable number of copies of the documentation as defined in the applicable license agreement and
delivered with the software product for licensee's internal, non-commercial use. The documentation may not be printed for resale or
redistribution.

Warranties and Liabilities


All warranties given by Intergraph Corporation about equipment or software are set forth in the EULA provided with the software or
applicable license for the software product signed by Intergraph Corporation, and nothing stated in, or implied by, this document or
its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes the information in
this publication is accurate as of its publication date.
The information and the software discussed in this document are subject to change without notice and are subject to applicable
technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document.
The software discussed in this document is furnished under a license and may be used or copied only in accordance with the terms
of this license. No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by
Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL EVALUATION AS
TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.
Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and symbol data.
Users should verify for themselves that the data is accurate and suitable for their project work.

Trademarks
Intergraph, FrameWorks, SmartPlant, PDS, ISOGEN, SmartSketch, and the Intergraph logo are registered trademarks and
MicasPlus is a trademark of Intergraph Corporation. Microsoft and Windows are registered trademarks of Microsoft Corporation.
MicroStation is a registered trademark of Bentley Systems, Inc. GTSTRUDL is a registered service mark of the Georgia Tech
Research Corporation, Atlanta, Georgia, U.S.A. Other brands and product names are trademarks of their respective owners.

Contents
Preface .......................................................................................................................................................... 7
FrameWorks Programming Language ...................................................................................................... 9
To run a FPL program ............................................................................................................................. 9
Creating Your Own FPL Programs ....................................................................................................... 10
FPL Example Programs ........................................................................................................................ 11
FPL Functions ....................................................................................................................................... 14
aecFPL_addUpdLoadCase ............................................................................................................ 17
aecFPL_addUpdLoadComb ........................................................................................................... 17
aecFPL_addUsrData ...................................................................................................................... 17
aecFPL_areaCutOut ....................................................................................................................... 18
aecFPL_buildAnalysisElements ..................................................................................................... 20
aecFPL_buildAnalysisNodeTable .................................................................................................. 20
aecFPL_deleteArc .......................................................................................................................... 21
aecFPL_deleteLoad ....................................................................................................................... 21
aecFPL_deleteMember .................................................................................................................. 22
aecFPL_deleteSolid ....................................................................................................................... 22
aecFPL_deleteUsrData .................................................................................................................. 22
aecFPL_displayArc ......................................................................................................................... 23
aecFPL_displayMember ................................................................................................................. 24
aecFPL_displaySolid ...................................................................................................................... 24
aecFPL_get3rdPartySoftware ........................................................................................................ 25
aecFPL_getArrayOfNmdGrp .......................................................................................................... 25
aecFPL_getAttachedModelInfo ...................................................................................................... 26
aecFPL_getCodeParms ................................................................................................................. 26
aecFPL_getCustomCodeParms ..................................................................................................... 27
aecFPL_getDefaults ....................................................................................................................... 28
aecFPL_getDesignParms .............................................................................................................. 28
aecFPL_getFWPversionNo ............................................................................................................ 29
aecFPL_getISTrecord .................................................................................................................... 29
aecFPL_getNmdGrpIndex .............................................................................................................. 30
aecFPL_getSecTabNameAndUnts ................................................................................................ 30
aecFPL_getSection ........................................................................................................................ 31
aecFPL_getTypeAndID .................................................................................................................. 31
aecFPL_getUnits ............................................................................................................................ 32
aecFPL_initialize ............................................................................................................................ 32
aecFPL_joinMembers..................................................................................................................... 32
aecFPL_modifyArc ......................................................................................................................... 33
aecFPL_modifyLoad ....................................................................................................................... 33
aecFPL_modifyMember ................................................................................................................. 34
aecFPL_modifySolid ....................................................................................................................... 34
aecFPL_placeArc ........................................................................................................................... 35
aecFPL_placeLoad ......................................................................................................................... 36
aecFPL_placeMember ................................................................................................................... 36
aecFPL_placeSolid ......................................................................................................................... 37
aecFPL_populateNmdGrpData ...................................................................................................... 37
aecFPL_queryArc ........................................................................................................................... 38
aecFPL_queryByNamedGroup ...................................................................................................... 39

FrameWorks Plus Programmer's Reference

Contents
aecFPL_queryLoad ........................................................................................................................ 39
aecFPL_queryLoadCase ................................................................................................................ 40
aecFPL_queryLoadCaseList .......................................................................................................... 41
aecFPL_queryLoadComb .............................................................................................................. 41
aecFPL_queryLoadCombList ......................................................................................................... 42
aecFPL_queryMember ................................................................................................................... 43
aecFPL_queryMemberSectionTable .............................................................................................. 43
aecFPL_querySectionTableInfo ..................................................................................................... 44
aecFPL_querySolid ........................................................................................................................ 45
aecFPL_querySolidDataEx ............................................................................................................ 45
aecFPL_querySolidType ................................................................................................................ 46
aecFPL_readUsrData ..................................................................................................................... 47
aecFPL_splitMember...................................................................................................................... 47
aecFPL_updateUsrData ................................................................................................................. 48
aecFPLState_setFunction .............................................................................................................. 48
FPLonData ..................................................................................................................................... 49
FPLonKeyin .................................................................................................................................... 49
FPLonReset .................................................................................................................................... 49
FPLsetSymb ................................................................................................................................... 50
Parametric Modeling Language ............................................................................................................... 51
PML Program Development .................................................................................................................. 54
The PML User Interface ........................................................................................................................ 54
Debugging a PML Program .................................................................................................................. 54
To run a PML program .......................................................................................................................... 55
PML Recommended Methodology........................................................................................................ 56
Programming in PML ............................................................................................................................ 57
The PML Commands...................................................................................................................... 58
Linear Components - Beam, Brace, Column.................................................................................. 61
Arc Components - Beam, Brace, Column ...................................................................................... 62
Area Components - Solids and Holes ............................................................................................ 62
Volume Components ...................................................................................................................... 63
Language File ................................................................................................................................. 63
Wakeup File .................................................................................................................................... 63
Message File .................................................................................................................................. 64
Current Requirements .................................................................................................................... 64
Section Orientation ......................................................................................................................... 66
PML Commands ................................................................................................................................... 67
ASCII .............................................................................................................................................. 71
Assign ............................................................................................................................................. 72
Bounds ........................................................................................................................................... 73
Close............................................................................................................................................... 74
Copy Assembly............................................................................................................................... 75
Copy Group .................................................................................................................................... 76
Copy Last Element ......................................................................................................................... 78
Default ............................................................................................................................................ 78
Delete ............................................................................................................................................. 81
Do ................................................................................................................................................... 81
Elseif ............................................................................................................................................... 83
Else ................................................................................................................................................. 83
End Assembly................................................................................................................................. 84
Enddo ............................................................................................................................................. 85
End Group ...................................................................................................................................... 85

FrameWorks Plus Programmer's Reference

Contents
Endif................................................................................................................................................ 86
Endwhile ......................................................................................................................................... 87
Evaluate .......................................................................................................................................... 87
Exit .................................................................................................................................................. 89
Help ................................................................................................................................................ 89
If ...................................................................................................................................................... 89
Inquire ............................................................................................................................................. 90
Language ........................................................................................................................................ 90
Mdr.................................................................................................................................................. 90
Message ......................................................................................................................................... 91
Mstn ................................................................................................................................................ 91
Open ............................................................................................................................................... 91
Origin .............................................................................................................................................. 92
Override .......................................................................................................................................... 93
Place Arc ........................................................................................................................................ 94
Place Area ...................................................................................................................................... 95
Place Beam .................................................................................................................................... 97
Place Brace .................................................................................................................................... 99
Place Column ............................................................................................................................... 100
Place Hole .................................................................................................................................... 102
Place Linestring ............................................................................................................................ 102
Place Line ..................................................................................................................................... 103
Place Primitive Arc ....................................................................................................................... 103
Place Shape ................................................................................................................................. 104
Place Text ..................................................................................................................................... 105
Place Volume ............................................................................................................................... 106
Read ............................................................................................................................................. 107
Run ............................................................................................................................................... 108
Save.............................................................................................................................................. 109
Scan.............................................................................................................................................. 110
Section .......................................................................................................................................... 111
Show Graphics ............................................................................................................................. 112
Start Assembly ............................................................................................................................. 113
Start Group ................................................................................................................................... 113
Translate ....................................................................................................................................... 114
Tutorial .......................................................................................................................................... 114
Units.............................................................................................................................................. 114
Update .......................................................................................................................................... 115
Wakeup ........................................................................................................................................ 117
While ............................................................................................................................................. 117
Write ............................................................................................................................................. 118
PML Tutorials ...................................................................................................................................... 119
Tutorial Cell Format ...................................................................................................................... 120
Tutorial Text Node ........................................................................................................................ 120
Tutorial Control Information .......................................................................................................... 120
Tutorial Display Information .......................................................................................................... 121
Creating the Tutorial Graphics ..................................................................................................... 121
Using MSTUT.UCM ...................................................................................................................... 122
Adding a Tutorial Cell to a Cell Library ......................................................................................... 124
Activating / Deactivating a Tutorial ............................................................................................... 125
Tutorial Display Considerations .................................................................................................... 125
Create a PML Tutorial .................................................................................................................. 126

FrameWorks Plus Programmer's Reference

Contents
Index ......................................................................................................................................................... 129

FrameWorks Plus Programmer's Reference

Preface

This document is a programming guide for Intergraph Corporation's FrameWorks Plus


structural engineering software.
FrameWorks Plus supports two programming languages which you can use to write your own
FrameWorks Plus commands. The first, and recommended, language is FrameWorks
Programming Language (FPL). FPL is the native programming language for FrameWorks Plus.
FrameWorks Plus also supports Parametric Modeling Language (PML), a structural modeling
programming language originally delivered with MicasPlus ModelDraft. MicasPlus ModelDraft
was Intergraph Corporation's general purpose interactive structural modeling system for the UNIX
(CLIX) operating system.

FrameWorks Plus Programmer's Reference

SECTION 1

FrameWorks Programming Language

FrameWorks Plus supports an Application Program Interface (API) that allows you to develop
your own programs that run in conjunction with FrameWorks Plus. These programs, called FPL
programs, can be used to automatically create parametric assemblies or structures; to modify or
delete existing members; to create new members; and to place, modify, and delete loads and solid
elements. The API uses the MicroStation Development Language (MDL) program to create
programs that communicate with the FrameWorks Plus MDL program.
The FPL program can call functions in FrameWorks Plus to place members, modify members,
extract information from the FrameWorks Plus database about selected members, retrieve
Section Library data, and other modeling operations. Based on MDL, your FPL program can use
tool box menus and dialog boxes, prompts, dynamic displays, and any other inherent MDL
graphical and user-interface functions. This allows you to build onto or customize the FrameWorks
Plus environment.
FPL functions cannot access the Selection Filter feature of FrameWorks Plus. All members
in a selection set are processed regardless of the selection filter settings.

Prerequisites
Because the FrameWorks Programming Language is based on MicroStation's MDL language, a
good working knowledge of MDL programming is required.

What's Changed?
Version 8
New arguments were added to aecFPL_areaCutOut (on page 18) to accommodate linear
member fireproofing and piping insulation.

In This Section
To run a FPL program ....................................................................9
Creating Your Own FPL Programs .................................................10
FPL Example Programs .................................................................11
FPL Functions.................................................................................14

To run a FPL program


1. Click File > FPL Application.
2. Select the FPL program you want to run.
3. Click OK.
By default, FPL programs are delivered in ..\fwplus\fpl\bin.

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

Creating Your Own FPL Programs


The example provided are more for boilerplates for your own development than as practical tools,
and you are welcome to copy and/or modify these as you wish to create your own custom utilities.
Perhaps the best way to get started working with FPL is to modify the simplest example, bldg.
There are several steps involved in creating an FPL program. To create and "make" (compile and
link) your programs, you must have the MicroStation Development Language (MDL) or the MDE
product installed on your machine. In order to get the provide make files to work correctly, you
must set the following environment variables:
SET FW_PRODUCT =C:\win32app\ingr\fwplus
SET USTN=C:\win32app\USTATION
SET AEC=C:\win32app\ingr\fwplus
SET
MLINK_STDLIB=C:\bentley\program\microstation\mdl\library\builtin.dlo
to your PATH add: %USTN%\USTATION\MDL\BIN
The location of MicroStation and FrameWorks Plus on your computer may not be the same
as those shown above. If not, use the path to MicroStation and FrameWorks Plus for your
computer in place of the ones shown.
Follow the steps below to create a new FPL program:
1. Create a subdirectory for your program under the \fpl directory. For example, to create a pipe
rack program, you might create a directory called \fw\fpl\pipe.
2. Write a "main" program (in MDL) similar to the ones in the examples. MDL programs are
normally given a ".mc" extension, so you might call your source file "pipe.mc". Your program
will be compiled and "linked" with the FPL library (fpllib.ml) as well as several standard MDL
libraries. The make file (#3 below) takes care of this for you. There are several FPL library
functions which your main program will call to first initialize communication with the
FrameWorks MDL program, and then to place, modify, and delete members, retrieve ESL
section data, and so forth. There are a number of FPL data structures that your program
needs to use in calling the FPL library functions. These structures are included in the include
file "fpl.h". Include this file in your MDL source files that call FPL functions.
3. Create a "make" file to build an MDL application (executable program) from the source file.
Again, use the example make files (make.mke) as templates for your own, changing file
names as needed.
4. Compile and link (make) your program by keying in "bmake make". If the make is successful,
your MDL application (for example, "pipe.ma") will now be in the \fw\fpl\bin directory. Test it by
starting FrameWorks in any existing model design file, and then start your FPL program by
keying in, for example, "mdl l pipe".
5. If your program has bugs, MDL provides a source level debugger that you can use to step
through the code and find your problems. Start up the debugger with the key in mdl load
debug pipe. Note you must remove the # comment line indicator in front of the "debug=1" line
at the top of the make file to use the debugger. Refer to the MicroStation MDL Manual for
more information on using the MDL debugger.

10

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

FPL Example Programs


The following example FPL programs are delivered with FrameWorks Plus in the
..\fwplus\fpl\examples directory.

Place Building (BLDG)


The simplest FPL program delivered with FrameWorks Plus is bldg, which places a building of 'n x
m' bays. The bay spacing and beam and column sizes are hard-coded to simplify the example.
Typically these parameters would be keyed-in by the user or entered on a dialog box.
To run bldg, first start FrameWorks Plus and then key-in mdl l bldg to load the FPL program. Enter
a tentative point in the design file where you want to place the building. To place the building, key
in the command mdl c placeBldg (case is important in MDL command names).

Change Section Size (CHGSECT)


The example chgsect demonstrates how FPL can be used to select and modify FrameWorks Plus
members. The command changes the section sizes of a single member, or a selection set of
members. Although this duplicates a built-in feature of FrameWorks Plus, this program illustrates
how MDL can be used to create powerful manipulation commands.
To run chgsect, key in mdl load chgsect to load the FPL program. To invoke the modify section
command, key in mdl c modifySection. The program displays the default active section, which is
used to modify selected members. At this point, you can key in a section size or a string of
characters that include a wildcard, such as w12*. The chgsect program searches the active IST
library(ies) for a section matching the key-in and displays the new active section if found. You can
then select members with data points, which highlight, and accept them with another data point to
modify the section size. This command also accepts a selection set, as do the FrameWorks Plus
modify commands. Build a selection set of members before invoking the modifySection command.
When the command is activated (keyed in), chgsect operates on all selected members.
FPL commands cannot access the Selection Filter capability of FrameWorks Plus. All
members in a selection set are process regardless of the Selection Filter settings.

Parametric Stair Placement (STAIR)


The stair example places a parametric staircase with or without handrails. This example is
somewhat more complicated since it activates a dialog box, and receives input (data buttons,
resets) from the user.

FrameWorks Plus Programmer's Reference

11

FrameWorks Programming Language


To run stair, key-in mdl load stair to load the FPL program. This command activates a dialog box
with the default stair parameters. Make any changes necessary to the parameters, and select the
Place button to begin placement. Enter a data point at the bottom of the stairway, and another at
the top. The FPL program displays (in tentative mode) the stairway. You can change the spacing,
handrail placement, or any other parameter on the dialog box and the tentative display refreshes
to show the current configuration. Enter a data point (or select the Place button again) to place the
stairway permanently.

Change Work Point Offset (CHGWPO)


This example, chgwpo, demonstrates how to modify existing members. Chgwpo is a program to
modify the work point offset of a previously place member. This allows you to offset the physical
end of a member from it's nominal placement point, and still preserve associativity with any
member with which it was in contact the nominal placement position.
The associativity affects both the associative manipulation commands (move, extend, modify end)
and the analysis interfaces (node creation). For example, if "K" braces are placed in a vertical
frame, you should initially place the vertical braces such that the endpoints touch the horizontal
support beam. For drawing and material report accuracy, the upper ends of the braces can be
modified to move the work point downward to the appropriate point. This moves the brace's
physical location to their correct position, and yet preserves the associativity with the beam at the
original, nominal framing point. Thus, even though the braces no longer are in direct contact with
the supporting beam, a node is inserted in the beam at the original contact point when an analysis
interface is run, and the associative move commands also maintain associativity between the
braces and the beam relative to this point.
To run the example program, key in mdl load chgwpo. This loads the mdl program that contains
the work point offset command. Then key in mdl c modifyWpo to invoke the modify work point
offset command. The command prompts Identify element. Select the member to be offset, at a
point "near" the end of the member to be offset. (FrameWorks Plus modifies the member end
which is nearest to this point.) Next, enter a data point at the new physical endpoint, that is, the
new work point. If you want to use precision key-ins, first snap to the member end before doing the
precision key-in. After this point is given, FrameWorks Plus moves the member end to the new
work point, and stores the offset for the member end to the original placement point.
To undo the effects of the offset, use the original FrameWorks Plus Modify Offset
command on the Manipulate tool box, and set the offset values to 0. This restores the member to
the original (nominal) placement point and sets the offsets to zero. You may then re-run the
modifyWpo command to try again.

12

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


Manipulate User Data (USERDATA)
This example shows how to add, read, modify, and delete user data on FrameWorks Plus
members. If a selection set is active when the Add, Read, Modify, or Delete button is selected, the
operation is performed on all the members in the selection set. Otherwise, the FPL prompts for a
single member. After a read operation is performed, the Next and Previous buttons can be used to
scroll through the user data, and the Report button can be used to generate ASCII file reports.
FPL commands cannot access the Selection Filter capability of FrameWorks Plus. All
members in a selection set are process regardless of the Selection Filter settings.
To run the example program, key in mdl l userdata. This loads the mdl program and brings up the
dialog box. After the mdl program is loaded, the dialog box can be brought up by keying in mdl c
StartUserData. In the dialog box, any of the fields can be changed. The displayed values are the
values used when adding or updating user data on a member or set of members. These values
are overwritten when a read is performed.
To customize this example program:
1. Change the user_data structure in userdata.h to contain the information required.
2. Change the dialog box definition in userdata.r to have the appropriate fields.
3. Change the UDinit function in userdata.mc to initialize the user data.
4. Change the UDreport function to report the user data and any member data as needed.

Setup default user data (DEFUDATA)


This example shows how to set up default user data that will be automatically added to a
FrameWorks Plus member when it is created.
To run this example program, key in mdl l defudata. After this is done, user data is automatically
placed on any new members created. These members must be created using FrameWorks Plus
creation commands. Members created using copy commands will not have default user data, but
if the original member has user data on it, that user data is copied to the new members (this is not
part of this FPL, but is part of the new functionality offered in FrameWorks 2.0 and higher). To halt
the placement of default user data, key in mdl unl defudata.
The default data is initialized in the GetUserData function in getuserd.mc. For simplicity, this user
data structure is the same as the data structure for the user data FPL example.
This example can be customized by simply modifying the user data structure, and changing
GetUserData to set the appropriate values.

Related Topics
Creating Your Own FPL Programs (on page 10)
FPL Example Programs (on page 11)
FPL Introduction (see "FrameWorks Programming Language" on page 9)

FrameWorks Plus Programmer's Reference

13

FrameWorks Programming Language

FPL Functions
FPL provides two types of commands: one group of commands specifically designed to allow your
FPL program to interface with the FrameWorks Plus program, and another group of generic MDL
utilities to simplify writing the user-interface for FPL programs.
The FPL function structures are defined in FPL.h and FPLparms.h. These files are delivered with
FrameWorks Plus in the ..\fwplus\fpl\inc directory.
The available FPL functions are:
aecFPL_addUpdLoadCase -- Adds or updates a load case table. For more information, see
aecFPL_addUpdLoadCase (on page 17).
aecFPL_addUpdLoadComb -- Adds or updates a load combination table. For more
information, see aecFPL_addUpdLoadComb (on page 17).
aecFPL_addUsrData -- Adds user data to a FrameWorks Plus member. For more
information, see aecFPL_addUsrData (on page 17).
aecFPL_areaCutOut -- Scans the solid member for intersecting members and performs a
group cutout. For more information, see aecFPL_areaCutOut (on page 18).
aecFPL_buildAnalysisElements -- Scans the FrameWorks Plus physical members in the
model for nodes and creates a list of analytical elements. For more information, see
aecFPL_buildAnalysisElements (on page 20).
aecFPL_buildAnalysisNodeTable -- Populates the physical member list and the analytical
node table list from the FPL member record list. For more information, see
aecFPL_buildAnalysisNodeTable (on page 20).
aecFPL_deleteArc -- Deletes a FrameWorks Plus arc. For more information, see
aecFPL_deleteArc (on page 21).
aecFPL_deleteLoad -- Deletes a FrameWorks Plus load. For more information, see
aecFPL_deleteLoad (on page 21).
aecFPL_deleteMember -- Deletes a FrameWorks Plus member. For more information, see
aecFPL_deleteMember (on page 22).
aecFPL_deleteSolid -- Deletes a FrameWorks Plus solid member. For more information, see
aecFPL_deleteSolid (on page 22).
aecFPL_deleteUsrData -- Deletes a FrameWorks Plus member's user data. For more
information, see aecFPL_deleteUsrData (on page 22).
aecFPL_displayArc -- Displays, erases, or highlights a FrameWorks Plus arc. For more
information, see aecFPL_displayArc (on page 23).
aecFPL_displayMember -- Displays, erases, or highlights a FrameWorks Plus member. For
more information, see aecFPL_displayMember (on page 24).
aecFPL_displaySolid -- Displays, erases, or highlights a FrameWorks Plus solid member.
For more information, see aecFPL_displaySolid (on page 24).
aecFPL_getArrayOfNmdGrp -- Returns a list of named groups assigned to a member or a
list of named groups in the project. For more information, see aecFPL_getArrayOfNmdGrp (on
page 25).
aecFPL_getAttachedModelInfo -- Retrieves the model ID and model name of all attached
models. For more information, see aecFPL_getAttachedModelInfo (on page 26).
aecFPL_getCodeParms -- Retrieves code parameters applied to a member. For more
information, see aecFPL_getCodeParms (on page 26).
aecFPL_getCustomCodeParms -- Retrieves custom code parameters applied to a member
(similar to aecFPL_getCodeParms). For more information, see
aecFPL_getCustomCodeParms (on page 27).

14

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

aecFPL_getDefaults -- Retrieves the default member parameter block and assigns these
attributes to "member". For more information, see aecFPL_getDefaults (on page 28).
aecFPL_getDesignParms -- Retrieves the design parameters applied to a member. For
more information, see aecFPL_getDesignParms (on page 28).
aecFPL_getFWPversionNo -- Retrieves the version number of FrameWorks Plus. For more
information, see aecFPL_getFWPversionNo (on page 29).
aecFPL_getISTrecord -- Retrieves the InterSect record for the section name. For more
information, see aecFPL_getISTrecord (on page 29).
aecFPL_getNmdGrpIndex -- Retrieves the index number of a specified named group. For
more information, see aecFPL_getNmdGrpIndex (on page 30).
aecFPL_getSection -- Retrieves properties from an InterSect library. For more information,
see aecFPL_getSection (on page 31).
aecFPL_getSecTabNameAndUnts -- Retrieves the section table name and units that
contains a specified section. For more information, see aecFPL_getSecTabNameAndUnts
(on page 30).
aecFPL_get3rdPartySoftware -- Retrieves the active 3rd Party Software and design code
settings. For more information, see aecFPL_get3rdPartySoftware (on page 25).
aecFPL_getTypeAndID -- Retrieves the user data from a MicroStation element. For more
information, see aecFPL_getTypeAndID (on page 31).
aecFPL_getUnits -- Retrieves the units the current model is using and returns them in the
variable "units". For more information, see aecFPL_getUnits (on page 32).
aecFPL_initialize -- Initializes your FPL program. For more information, see aecFPL_initialize
(on page 32).
aecFPL_joinMembers -- Joins two FrameWorks Plus members to form a single member. For
more information, see aecFPL_joinMembers (on page 32).
aecFPL_modifyLoad -- Modifies a FrameWorks Plus load's attributes. For more information,
see aecFPL_modifyLoad (on page 33).
aecFPL_modifyMember -- Modifies a FrameWorks Plus member's attributes. For more
information, see aecFPL_modifyMember (on page 34).
aecFPL_modifyArc -- Modifies a FrameWorks Plus arc's radius. For more information, see
aecFPL_modifyArc (on page 33).
aecFPL_modifySolid -- Modifies a FrameWorks Plus solid member's attributes. For more
information, see aecFPL_modifySolid (on page 34).
aecFPL_placeArc -- Creates a FrameWorks Plus arc member from a MicroStation arc
element. For more information, see aecFPL_placeArc (on page 35).
aecFPL_placeLoad -- Places loads on a FrameWorks Plus linear member. For more
information, see aecFPL_placeLoad (on page 36).
aecFPL_placeMember -- Places FrameWorks Plus members in a .dgn file. For more
information, see aecFPL_placeMember (on page 36).
aecFPL_placeSolid -- Places FrameWorks Plus solid members. For more information, see
aecFPL_placeSolid (on page 37).
aecFPL_populateNmdGrpData -- Returns pointers to the namedGroupType structure. For
more information, see aecFPL_populateNmdGrpData (on page 37).
aecFPL_queryArc -- Retrieves FrameWorks Plus arc member attributes. For more
information, see aecFPL_queryArc (on page 38).
aecFPL_queryByNamedGroup -- Retrieves members that belong to a Named Group. For
more information, see aecFPL_queryByNamedGroup (on page 39).
aecFPL_queryLoad -- Retrieves FrameWorks Plus load attributes. For more information, see
aecFPL_queryLoad (on page 39).

FrameWorks Plus Programmer's Reference

15

FrameWorks Programming Language

16

aecFPL_queryLoadCase -- Retrieves FrameWorks Plus load case attributes. For more


information, see aecFPL_queryLoadCase (on page 40).
aecFPL_queryLoadCaseList -- Retrieves a list of load cases. For more information, see
aecFPL_queryLoadCaseList (on page 41).
aecFPL_queryLoadComb -- Retrieves FrameWorks Plus load combination attributes. For
more information, see aecFPL_queryLoadComb (on page 41).
aecFPL_queryLoadCombList -- Retrieves a list of load combination attributes. For more
information, see aecFPL_queryLoadCombList (on page 42).
aecFPL_queryMember -- Retrieves FrameWorks Plus member attributes. For more
information, see aecFPL_queryMember (on page 43).
aecFPL_queryMemberSectionTable -- Retrieves information about the section tables of a
specified member. For more information, see aecFPL_queryMemberSectionTable (on page
43).
aecFPL_querySectionTableInfo -- Retrieves information about the section tables of the
active model and any attached models. For more information, see
aecFPL_querySectionTableInfo (on page 44).
aecFPL_querySolid -- Retrieves FrameWorks Plus solid member attributes. For more
information, see aecFPL_querySolid (on page 45).
aecFPL_querySolidDataEx -- Retrieves FrameWorks Plus solid member attributes. Similar
to aecFPL_querySolid but returns more data. For more information, see
aecFPL_querySolidDataEx (on page 45).
aecFPL_querySolidType -- Retrieves the type of solid: slab, wall, solid, slabhole, wallhole,
solidhole. For more information, see aecFPL_querySolidType (on page 46).
aecFPL_readUsrData -- Reads a FrameWorks Plus member's user data. For more
information, see aecFPL_readUsrData (on page 47).
aecFPL_splitMember -- Splits a single FrameWorks Plus member into two members. For
more information, see aecFPL_splitMember (on page 47).
aecFPLState_setFunction -- Sets a user function after a member add. For more information,
see aecFPLState_setFunction (on page 48).
aecFPL_updateUsrData -- Updates a FrameWorks Plus member's user data. For more
information, see aecFPL_updateUsrData (on page 48).
FPLonData -- Hook function for data points. For more information, see FPLonData (on page
49).
FPLonKeyin -- Hook function for key-ins. For more information, see FPLonKeyin (on page
49).
FPLonReset -- Hook function for resets. For more information, see FPLonReset (on page 49).
FPLsetSymb -- Sets a FrameWorks Plus member's symbology. For more information, see
FPLsetSymb (on page 50).

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

aecFPL_addUpdLoadCase
int aecFPL_addUpdLoadCase (FPLcreateLoadCase *ldcase);
Arguments:
Input
The structure FPLcreateLoadCase passes the pointer ldcase to create the load case.
Description:
This function adds or updates a load case to the model using the parameters defined in structure
"ldcase".
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_addUpdLoadComb
int aecFPL_addUpdLoadComb(FPLcreateLoadComb *ldcomb);
Arguments:
Input
The structure FPLcreateLoadComb passes the point ldcomb to create the load combination.
Description:
This function adds or updates a load combination to the model using the parameters defined in the
structure "ldcomb".
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:

aecFPL_addUsrData
int aecFPL_addUsrData(id, size, data, type)
int id;
int *size;
char *data;
int type;
Arguments:
id is the member ID.
size is the size of the user data in bytes.
data is the user data to be added to the member.
type is the member type.
Description:
This function adds user data to a member. The size should be the size of the user data in bytes.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
Non-zero errors are:
FWUSRDATAEXISTS -- User data already exists on the member.

FrameWorks Plus Programmer's Reference

17

FrameWorks Programming Language


FWINVMEM -- Member ID is invalid.
FWNOADD -- Could not add the user data.
See also:

aecFPL_areaCutOut
int aecFPL_areaCutOut(solidID, clearance, num, rptFlg, placeSleeve,
sleeveType, FWPlinearFlg, UStationFlg, FWPsolidFlg, incremnt,
incremntFctr, overrideCutouts);
long solidID
double clearance
int num[5]
int rptFlg
int placeSleeve
int sleeveType
int FWPlinearFlg
int UStationFlg
int FWPsolidFlg
double incrmnt
double incrmntFctr
long overrideCutouts
int InclFireproof
int InclInsulation
Arguments:
Inputs
solidID is the ID of the solid to perform the cutout on.
clearance is the clearance between the outside of the cutting object and the inside of the hole.
rptFlg when set, reports but does not create the cutout.
placesleeve flag that when set, places a sleeve if the cutout is around a circular object.
sleeveType defines the member type of the sleeve to place. The valid options are: 0 for beam,
1 for column, 2 for vertical brace, and 3 for horizontal brace.
FWPlinearFlg flag that when set, performs cutouts for FWP linear members that intersect the
solid.
UStationFlg flag that when set, performs cutouts for MicroStation solids that intersect the solid.
FWPsolidFlg flag that when set, performs cutouts for other FrameWorks Plus solids that
intersect the solid.
incremnt is the increment factor for the cutout. Refer to the FrameWorks Plus Reference
Guide or help for more information on this increment value.
incrmntFctr is the increment factor for the cutout. Refer to the FrameWorks Plus Reference
Guide or help for more information on this increment factor.
overrideCutouts flag to override cutouts. Use 1 to re-create existing cutout with new settings; 0
to not override existing cutout.
InclFireproof flag that when set, performs cutouts for FWP linear members placed with
fireproofing that intersects the solid.
InclInsulation flag that when set, performs cutouts for piping members placed with insulation
thickness that intersects the solid.
Outputs
num[0] is the number of linear members intersecting the solid.

18

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


num[1] is the number of FrameWorks Plus solids intersecting the solid.
num[2] is the number of MicroStation surfaces and solids intersecting the solid.
num[3] is the number of cutout created in the solid.
num[4] is reserved for an internal purpose.
Description:
This function performs a group cutout on the solid member with id, solidID. The solid is scanned
for intersecting members. Depending on the flags set, a cutout is applied. The number of cutouts
performed is returned in num.
Returns:
This function returns 0 if successful or 1 if there is a problem.
See also:
Example:
{
long solidID;
double clearance=0.0;
int num=0, rptFlg, placeSleeve, placeSleeve, sleeveType, FWPlinearFlg,
UStationFlg, FWPsolidFlg;
int sts=0;
rptFlg=0; /* do cutout */
placeSleeve=1; /* place a sleeve if possible */
sleeveType=3; /* use H. Braces default section type for sleeve */
FWPlinearFlg=1;/* use FW+ linear members for cutouts */
UStationFlg = FWPsolidFlg = 0; /* do not use Mstn elements or FW+ solids
for cutouts */
incremnt=.2;
incremntFctr=.5;
.
.
.
sts = aecFPL_areaCutOut(solidID, clearance, &num, rptFlg, placeSleeve,
sleeveType, FWPlinearFlg, UStationFlg, FWPsolidFlg, incremnt,
incremntFctr
);
.
.
.
}

FrameWorks Plus Programmer's Reference

19

FrameWorks Programming Language

aecFPL_buildAnalysisElements
int aecFPL_buildAnalysisElements(list, numInList, pMem, aMem, numAmems)
FPLreportList *list;
long numInList;
FPLpMemTable *pMem;
FPLaMemTable **aMem;
int *numAmems;
Arguments:
Input
list is the list of FPL member records in the model.
numInList is the number of member records in the model.
pMem is the physical members in the model
Output
aMem is the analytical members in the model.
numAmems is the number of analytical members found.
Description:
This function "scans" the FrameWorks Plus physical members in the model for nodes and creates
a list of analytical elements. These elements are returned in the structure "aMem". The structures
for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:
aecFPL_buildAnalysisNodeTable (on page 20)

aecFPL_buildAnalysisNodeTable
int aecFPL_buildAnalysisNodeTable(list, numInList, pMember, nTable)
FPLreportList *list;
long numInList;
FPLpMemTable *pMember;
FPLnodeTable **nTable;
Arguments:
Input
list is the list of FPL member records in the model.
numInList is the number of member records in the model.
Output
pMember is the physical members in the model.
nTable is the node table structure.
Description:
This function populates the physical member list and the analytical node table list from the FPL
member record list. The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:

20

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


aecFPL_buildAnalysisElements (on page 20)

aecFPL_deleteArc
int aecFPL_deleteArc(id, file)
long id;
int file;
Arguments:
Input
id is the ID of the arc member to be deleted.
file is the file number model that contains the arc. This must always be 0.
Description:
This function deletes the arc with the arc identification number "id". This number can be obtained
from the aecFPL_queryArc function. The "file" argument is the reference file partition number. The
delete arc function works only for arcs in the local (master file) model, and thus "file" must be equal
to zero. The "file" parameter is included as an argument only for consistency with the query arc
function and to ensure that an arc from the local model is not inadvertently deleted after an arc is
selected from an attached partition.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:
aecFPL_queryArc (on page 38)

aecFPL_deleteLoad
int aecFPL_deleteLoad (id, file);
long id;
int file;
Arguments:
Inputs
id is the ID of the load to be deleted.
file is the file number of the model that contains the load to be deleted. This must always be 0.
Description:
This function deletes the load with the load identification number "id". This number can be
obtained from the aecFPL_queryLoad function. The file argument is the reference file partition
number. The delete load function works only for loads in the local (master file) model, and thus file
must be zero. It is included as an argument only for consistency with the query load function and to
ensure that a load from the local model is not inadvertently deleted after a load is selected from an
attached partition.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

FrameWorks Plus Programmer's Reference

21

FrameWorks Programming Language

aecFPL_deleteMember
int aecFPL_deleteMember( id, file )
long id;
int file;
Arguments:
Inputs
id is the ID of the member to be deleted.
file is the file number of the model that contains the member to be deleted. This must always
be 0.
Description:
This function deletes the member with the member identification number "id". This number can be
obtained from the aecFPL_queryMember function. The file argument is the reference file partition
number. The delete member function works only for members in the local (master file) model, and
thus file must be zero. It is included as an argument only for consistency with the query member
function and to ensure that a member from the local model is not inadvertently deleted after a
member is selected from an attached partition.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_deleteSolid
int aecFPL_deleteSolid (id, file)
int id;
int file;
Arguments:
Inputs
id is the ID of the solid member to be deleted.
file is the file number of the model that contains the solid member to be deleted. This must
always be 0.
Description:
This function deletes the solid member with the solid member identification number "id". This
number can be obtained from the aecFPL_querySolid function. The file argument is the reference
file partition number. The delete solid member function works only for solid members in the local
(master file) model, and thus file must be zero. It is included as an argument only for consistency
with the query solid member function, and to ensure that a solid member from the local model is
not inadvertently deleted after a solid member is selected from an attached partition.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_deleteUsrData
int aecFPL_deleteUsrData(id)
int id;

22

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


Arguments:
Inputs
id is the ID of the member that the user data is to be deleted from.
Description:
This function deletes the user data on a member.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
Non-zero error include:
FWINVMEM -- member ID is invalid
FWDATAERR -- Problems encountered deleting data
See also:

aecFPL_displayArc
int aecFPL_displayArc(id, file, mode)
long id;
int file;
int mode;
Arguments:
Inputs
id is the ID of the arc member to display.
file is the file attachment number of the model that contains the arc member to display. Zero is
the master file.
mode is the display mode (hilite, normaldraw, erase)
Description:
This function allows you to display, erase, or highlight a specific arc. FrameWorks Plus displays
the identified arc in all active views using the display mode specified. The display modes are
defined in the MDL include file msdefs.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:

FrameWorks Plus Programmer's Reference

23

FrameWorks Programming Language

aecFPL_displayMember
int aecFPL_displayMember(id, file, mode)
long id;
int file;
int mode;
Arguments:
Inputs
id is the member ID of the member to display.
file is the file attachment number of the model that contains the member to display. Zero is the
master file.
mode is the display mode (hilite, normaldraw, erase)
Description:
This function allows you to display, erase, or highlight a specific member. FrameWorks Plus
displays the identified member, in all active views, using the display mode specified. The display
modes are defined in the MDL include file msdefs.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_displaySolid
int FPL_displaySolid (id, file, mode)
long id;
int file;
int mode;
Arguments:
Inputs
id is the member ID of the solid to display.
file is the file attachment number of the model that contains the solid to display. Zero is the
master model.
mode is the display mode (hilite, normaldraw, erase).
Description:
This function allows you to display, erase, or highlight a specific solid member. FrameWorks Plus
displays the identified solid member, in all active views, using the display mode specified. The
display modes are defined in the MDL include file msdefs.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

24

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

aecFPL_get3rdPartySoftware
int aecFPL_get3rdPartySoftware(*software, *dgnCode)
int software;
int dgnCode;
Arguments:
Outputs
software is the current analysis software package. 0 is STAAD. 1 is GTSTRUDL. 3 is LARSA.
4 is RAM. 5 is SAP2000.
dgnCode is the current design code. For STAAD: 0 is AISC-ASD, 1 is AISC-LRFD, 2 is
custom.
For GTSTRUDL: 0 is ASD9, 1 is BS5950, 2 is LRFD1, 3 is NF83, 4 is TOWER2, and 5 is
custom.
Description:
This function returns the active 3rd Party Software and design code settings.
Returns:
This function returns 0 if successful. Otherwise, it returns a non-zero error number.
See also:
Example:
{
int 3rdPartySoftware;
int designCode;
aecFPL_get3rdPartySoftware(&3rdPartySoftware, &designCode);
.
.
.
}

aecFPL_getArrayOfNmdGrp
int aecFPL_getArrayOfNmdGrp(*nmdGrpArray[], memID, memType)
char *nmdGrpNameArray[],
long memID,
int memType
Arguments:
Inputs
memID is the member ID that you want the list of Named Groups for. Pass 0 for the memID if
you want named group information on the project.
memType is the member type. Pass 0 for the memType if you want named group information
on the project. The valid member type arguments are MEMuid, ARCuid, SLABuid and
WALLuid. The FWDEFS.H file contains the list of ID's found.
Outputs
*nmdGrpNameArray[] is an array of the named groups assigned to the member that you
passed or the complete list of named groups in the project.
Description:
This function returns information about named groups in the project or assigned to a particular
member. This function also works for solids and holes.

FrameWorks Plus Programmer's Reference

25

FrameWorks Programming Language


Returns:
If the function finds the named group record, then it returns the total number of named groups
found. If you pass an incorrect member ID or member type, the function returns a -1 value. If the
function cannot open the database file for reading, it returns a -2 value. If the member is not
assigned any named groups or the project does not have any named groups, the function returns
a 0 value.
See also:

aecFPL_getAttachedModelInfo
int aecFPL_getAttachedModelInfo(*modelID, *modelName[])
int *modelID,
char *modelName[]
Arguments:
Outputs
*modelID is the model ID of each attached model found.
*modelName[] is the model name of each attached model found.
Description:
This function returns the model ID and model name for the current model and any attached
FrameWorks Plus models. If there are no attached models, the function only returns the active
model information. The first element in each array is the active model ID and name.
Returns:
This function returns the number of attached models.
See also:

aecFPL_getCodeParms
int aecFPL_getCodeParms(*codePrms, id, file)
MemCodPrmsDta codePrms;
long id;
int file;
Arguments:
Inputs
id is the member ID of the member to get the parameters from.
file is the file attachment number of the model that contains the member. Zero is the master
model.
Outputs
codePrms is the code parameters structure.
Description:
This function retrieves the code parameters applied to the member with ID, id. The structures for
this function are described in ..\fwplus\fpl\inc\FPLparms.h.
This function requires the statement #include < fplparms.h> at the top of the file. If the
fplparms.h file isn't in the include path stated in the makefile, the user will need to specify the path:
#include "c:\win32app\ingr\fwplus\fpl\inc\fplparms.h"
Returns:

26

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


This function returns 0 if successful or 1 if there is a problem.
See also:
Example:
{
int sts=0, file=0;
long memberID;
MemCodPrmsDta codeParms;
.
.
.
sts = aecFPL_getCodeParms(&codeParms, memberID, file);
.
.
.
}

aecFPL_getCustomCodeParms
int aecFPL_getCustomCodeParms(*custCPrms, id, file)
customCP custCPrms;
long id;
int file;
Arguments:
Inputs
id is the member ID of the member to get the parameters from.
file is the file attachment number of the model that contains the member. Zero is the master
model.
Outputs
custCPrms is the custom code parameters structure.
Description:
This function retrieves the custom code parameters applied to a member. The structures for this
function are described in ..\fwplus\fpl\inc\FPLparms.h.
This function requires the statement #include < fplparms.h> at the top of the file. If the
fplparms.h file isn't in the include path stated in the makefile, the user will need to specify the path:
#include "c:\win32app\ingr\fwplus\fpl\inc\fplparms.h"
Returns:
This function returns 0 if successful or 1 if there is a problem.
See also:
Example:
#include <fplparms.h>
{
int sts=0, file=0;
long memberID;
customCP customParms;
.
.
.
sts = aecFPL_getCustomCodeParms(&customParms, memberID, file);

FrameWorks Plus Programmer's Reference

27

FrameWorks Programming Language


.
.
.
}

aecFPL_getDefaults
int aecFPL_getDefaults(member)
FPLplaceMember member[ ];
Arguments:
member is the member to assign defaults. This is both and input and an output.
Description:
This function retrieves the default member parameter block and assigns these attributes to
"member", for each of the member types: beam, column, vertical brace, and horizontal brace.
Therefore, "member" must be declared in the calling routine as: FPLplaceMember member[4];
The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:

aecFPL_getDesignParms
int aecFPL_getDesignParms(*dgnPrms, id, file)
MemDgnPrmsDta *dgnPrms;
long id;
int file;
Arguments:
Inputs
id is the member ID of the member to get parameters from.
file is the file attachments number of the model that contains the member. Zero is the master
model.
Outputs
dgnPrms is the code parameters structure.
Description:
This function retrieves the design parameters applied to the member ID, id. The structures for this
function are described in ..\fwplus\fpl\inc\FPLparms.h.
Returns:
This function returns 0 if successful or 1 if there is a problem.
This function requires the statement #include <fplparms.h> at the top of the file. If the
fplparms.h file isn't in the include path stated in the makefile, the user will need to specify the path:
#include "c:\win32app\ingr\fwplus\fpl\inc\fplparms.h"
See also:
Example:
#include <fplparms.h>
{

28

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


int sts=0, file=0;
long memberID;
MemDgnPrmsDta designParms;
.
.
.
sts = aecFPL_getDesignParms(&designParms, memberID, file);
.
.
.
}

aecFPL_getFWPversionNo
int aecFPL_getFWPversionNo (*version)
long *version;
Arguments:
Outputs
*version is the current FrameWorks Plus version number.
Description:
This function returns the current FrameWorks Plus version. This returns only major version
numbers, not minor version number.
Returns:
This function returns SUCCESS if successful and any other value if there is an error.
See also:
Example:
Version Number

Returned Value

03.02.01.12

30201

03.02.01.02

30201

07.00.00.12

70000

11.01.01.02

110101

aecFPL_getISTrecord
int aecFPL_getISTrecord(*istRecord, *sectionName)
ISTRecord *istRecord;
char *sectionName;
Arguments:
Inputs
sectionName is the section name to search for.
Outputs
istRecord is the IST record that was found.
Description:

FrameWorks Plus Programmer's Reference

29

FrameWorks Programming Language


This function retrieves the ISTRecord for section name. The structures for this function are
described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns 0 if successful or 1 if there is a problem.
See also:
Example:
{
ISTRecord istrec;
char sectionName[24];
sts=0;
strcpy(sectionName, "W18X65");
sts = aecFPL_getISTrecord(&istrec, sectionName);
}

aecFPL_getNmdGrpIndex
int aecFPL_getNmdGrpIndex(*nmdGrpName)
char *nmdGrpName;
Arguments:
Inputs
nmdGrpName is the pointer to the named group name whose index you want returned.
Description:
This function returns the index number of a particular named group in the list of named groups.
Returns:
Returns the index number of the name group. Otherwise, returns -1 if there is an error retrieving
the index number.
See also:

aecFPL_getSecTabNameAndUnts
int aecFPL_getSecTabNameAndUnts(*secName, *tableUnits, *tableName)
char *secName,
short *tableUnits,
char *tableName
Arguments:
Inputs
*secName is the name of the section, for example, W18X45.
Outputs
*tableUnits is the units of the section table in which the section was found. Returns 0 for inch
and 1 for millimeters.
*tableName is name of and full path to the section table in which the section was found.
Description:
This function returns information about the section table where the input section was found. This
function searches standard section tables and user section tables of the current model and
attached models.

30

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


Returns:
This function returns the section information about the standard or user section table and then
returns 0. If the section is not found, it returns -1.
See also:

aecFPL_getSection
int aecFPL_getSection (section, name)
ESLrecord *section;
char *name;
Arguments:
Inputs
name is the section name to retrieve properties for.
Outputs
section is the section properties that are returned.
Description:
This function returns the section properties for a structural section from the attached standard
section library or the user section library (if any). The structures for this function are described in
..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_getTypeAndID
int aecFPL_getTypeAndID(el,type,id)
MSElementUnion *el;
int *type;
long *id;
Arguments:
Inputs
el is the MicroStation element that you want to query against.
Outputs
type is the FrameWorks Plus member type associated with the MicroStation element.
id is the FrameWorks Plus member ID associated with the MicroStation element.
Descriptions:
This function accepts a MicroStation element as an argument and extracts the user data. After the
data is extracted, the id and type are determined from the data and passed back.
Returns:
If the MicroStation element has user data, type and int will be non-zero values.
See also:

FrameWorks Plus Programmer's Reference

31

FrameWorks Programming Language

aecFPL_getUnits
int aecFPL_getUnits(units)
FWmodUnits *units;
Arguments:
Outputs
units are the units of the current model.
Description:
This function retrieves the units the current model is using and returns them in the variable "units".
The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:

aecFPL_initialize
int aecFPL_initialize (load)
int load;
Arguments:
Inputs
load tells FrameWorks Plus to start if it is not already active.
Description:
This function should be called before any other FPL functions, usually when your FPL
program starts. It initializes the communication between your MDL program and the
FrameWorks Plus program.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_joinMembers
int aecFPL_joinMembers(ids, fileNums, num)
long *ids;
int *fileNums;
int num;
Arguments:
Inputs
ids is a list of member IDs to join together.
fileNums is a list of file attachment numbers.
num is the number of members that are being joined.
Description:
This function joins a list of collinear members into a single member. The list of ids and fileNums
can be obtained by calling the appropriate MDL function for each element in a specified selection
set.

32

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:
aecFPL_splitMember (on page 47)

aecFPL_modifyArc
int aecFPL_modifyArc(member, newarc, id, file)
FPLplaceMember *member;
FPLarc *newarc;
long id;
int file;
Arguments:
Inputs
member is the member record of the new arc.
newarc is the arc record of the new arc.
id is the ID of the arc to be modified.
file is the file attachment number of the model that contains the arc. Zero is the master model.
Description:
This function modifies the arc identified by arc id number and file. FrameWorks Plus will modify all
attributes from the arc structure and the arc member record which differ from the existing arc
attributes. The file argument must be zero, as only arcs from the local model (master file) can be
modified. It is included as an argument only for consistency with the query arc function, and to
ensure that an arc from the local model is not inadvertently modified after an arc is selected from
an attached partition. The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a nonzero error number.
See also:
aecFPL_queryArc (on page 38)

aecFPL_modifyLoad
int aecFPL_modifyLoad (id, load, file)
long id;
FPLplaceLoad *load;
int file;
Arguments:
Inputs
id is the load ID of the load to modify.
load is the load and load case parameters.
file is the file attachment number of the model that contains the load to modify. Zero is the
master model.
Description:
This function modifies the load identified by load id number and file. FrameWorks Plus will modify
all attributes from the load structure which differ from the existing load attributes. The file argument

FrameWorks Plus Programmer's Reference

33

FrameWorks Programming Language


must be zero, as only loads from the local model (master file) can be modified. It is included as an
argument only for consistency with the query member function, and to ensure that a load from the
local model is not inadvertently modified after a load is selected from an attached partition. The
structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_modifyMember
int aecFPL_modifyMember (member, id, file)
FPLplaceMember *member;
long id;
int file;
Arguments:
Inputs
member is the new attributes for the member.
id is the member ID of the member to modify.
file is the file attachment number of the model that contains the member to modify. Zero is the
master file.
Description:
This function modifies the member identified by member id number and file. FrameWorks Plus will
modify all attributes from the member structure which differ from the existing member attributes.
The file argument must be zero, as only members from the local model (master file) can be
modified. It is included as an argument only for consistency with the query member function, and
to ensure that a member from the local model is not inadvertently modified after a member is
selected from an attached partition. The structures for this function are described in
..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_modifySolid
int aecFPL_modifySolid (solid, id, file)
FPLplaceSolid *solid;
long id;
int file;
Arguments:
Inputs
solid is the new attributes for the solid member.
id is the member ID of the solid to modify.
file is the file attachment number of the model that contains the solid to modify. Zero is the
master model.
Description:

34

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


This function modifies the solid member identified by solid member id number and file.
FrameWorks Plus will modify all attributes from the solid member structure which differ from the
existing member attributes. The file argument must be zero, as only solid members from the local
model (master file) can be modified. It is included as an argument only for consistency with the
query solid member function, and to ensure that a solid member from the local model is not
inadvertently modified after a member is selected from an attached partition. The structures for
this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_placeArc
int aecFPL_placeArc(member, center, primary, secondary, rMatrix, start,
sweep)
FPLplaceMember *member;
Dpoint3d *center;
double primary;
double secondary;
RotMatrix *rMatrix;
double start;
double sweep;
Arguments:
Inputs
member is the arc member record.
center is the center of the arc or NULL.
primary is the primary axis.
secondary is the secondary axis.
rMatrix is the rotational matrix or NULL.
start is the starting angle.
sweep is the sweep angle for the arc.
Descriptions:
This function places an arc in the model using the parameters defined in the structure "member"
and the other arguments listed above. The "center" parameter defines the center point for the arc.
If center is NULL, the center is placed at [0,0,0] in the current coordinate system. The "primary"
and "secondary" parameters are the sizes of the primary and secondary arc axes. FrameWorks
Plus only supports equal primary and secondary axes. The "rMatrix" parameter is the arc's
rotation matrix. If rMatrix is NULL, the identity matrix (no rotation) is used. The "start" and "sweep"
parameters are the arc's starting and sweep angles in radians. The new arc member is displayed
in all active model views. You cannot place an arc with an orientation vector tangent to the arc
member at end 1. The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

FrameWorks Plus Programmer's Reference

35

FrameWorks Programming Language

aecFPL_placeLoad
int aecFPL_placeLoad (memberId, file, load)
long memberID;
int file;
FPLplaceLoad *load;
Arguments:
Inputs
memberID is the member ID for the member on which to place the load.
file is the file attachment number for the model that contains the member on which to place the
load. Zero is the master model.
load is the load and load case parameters to place.
Description:
This function places a load on a member in the model identified by the member id number and file.
The file number must be zero as loads can only be placed on members in the local model (master
file). The load placed is defined in the structure "load". The new load is displayed in all active
model views. The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_placeMember
int aecFPL_placeMember (member)
FPLplaceMember *member;
Arguments:
Inputs
member is the attributes of member to place.
Description:
This function places a new member in the model using the parameters defined in structure
"member". The new member is displayed in all active model views. The structures for this function
are described in ..\fwplus\fpl\inc\FPL.h. In the FPLplaceMember structure, there is a field
cntrlNamedG that indicates the controlling named group for the member. By default, for all
members, this field should be set to -1 at the time of member placement. When named groups are
applied to a member, this field is set to the appropriate value.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

36

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

aecFPL_placeSolid
int aecFPL_placeSolid (solEleDp, solid, type, parent_id)
MSElementDescr *solEleDP;
FPLplaceSolid *solid;
int type;
int *parent_id;
Arguments:
Inputs
solEleDp is the solid element descriptor.
solid is the FPL solid element parameters.
type is the type of solid you want to place: 5 is slab, 6 is wall, 8 is generic solid, 9 is slab hole,
10 is wall hole, and 12 is generic solid hole.
parent_id is the member ID of the parent solid if you are placing a hole.
Outputs
parent_id is the member ID of the parent solid if you are placing a hole.
Description:
This function places a new solid member in the model using the element descriptor and the
parameters defined in structure "solid". If a hole is being placed the parent solid id needs to be
passed in. If the solid member is not a hole, then the member id is passed back in "parent_id". The
new solid member is displayed in all active model views. You must use type 5 or 6 for the solid's
thickness to be reported in material take-off reports and in the Review Element commands. Types
other than 5 and 6 will report a zero thickness. The structures for this function are described in
..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_populateNmdGrpData
namedGroupType* aecFPL_populateNmdGrpData (numOfNmdGrps, nmdGrpNames);
int numOfNmdGrps;
char *nmdGrpNames[];
Arguments:
Inputs
numOfNmdGrps is the number of named groups that are to be populated in the named group
array.
nmdGrpNames is an array of pointers to strings containing the named group names to be
populated.
Description:
This function returns pointer to structure namedGroupType (defined in ..\fwplus\fpl\inc\FPL.h).
This structure is populated with data based on input. This populated structure can be used in
functions like aecFPL_placeMember.
Returns:
This function returns NULL when the named group array could not be successfully populated.
See also:

FrameWorks Plus Programmer's Reference

37

FrameWorks Programming Language

aecFPL_queryArc
int aecFPL_queryArc(member, arc, id, mid, mem_created, mem_modified,
filepos, file);
FPLplaceMember *member;
FPLarc *arc;
long *id;
int *mid;
time_t *mem_created;
time_t *mem_modified;
long filePos;
int file;
Arguments:
Inputs
mem_created is the time of member creation. NULL if not required.
mem_modified is the time of member modification. NULL if not required.
filePos is the file position of the member.
file is the file attachment number of the model that contains the member to query. Zero is the
master model.
Outputs
member is the member record of the requested member.
arc is the arc record of the requested member.
id is the member ID of the requested member.
mid is the model ID of the attached partition.
mem_created is the time of member creation.
mem_modified is the time of member modification.
Description:
This function allows you to retrieve all of the attributes from a selected FrameWorks Plus arc. The
member is identified by its file position (filePos) and file number (file). You can query a member in
the local database, or one from an attached partition (file> 0). The arc attributes are returned in the
"member" and "arc" structures, which are identical to the structures used in the arc placement and
modification functions. The structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:
aecFPL_modifyArc (on page 33) and aecFPL_placeArc (on page 35)

38

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

aecFPL_queryByNamedGroup
int aecFPL_queryByNamedGroup(*namedGroup, *num, **ids)
char namedGroup
int num
int ids
Arguments:
Inputs
namedGroup is the name of the named group to search for.
ids is the list of matching IDs of number, num
Outputs
num is the number of members found.
ids is the list of matching IDs of number, num
Description:
This function allows you to retrieve all members of a named group. The memory allocated by
aecFPL_queryByNamedGroup for ids will need to be freed by the programmer.
Returns:
This function returns 0 if successful, 1 if there was a problem scanning the file.
See also:
Example:
{
char NamedGroup[24];
int numberOfIds=0, *idList=NULL, status=0;
strcpy(NamedGroup, "Beams");
status=aecFPL_queryByNamedGroup("Beams", &numberOflds, &idList);
.
.
.
if (idList)
free(idList);
idList=NULL;
}

aecFPL_queryLoad
int aecFPL_queryLoad (**load, **id, *mid, *num_loads, filePos, file,
memberID);
FPLplaceLoad **load;
long **id;
int *mid;
int *num_loads;
long filePos;
int file;
long memberID;
Arguments:
Inputs

FrameWorks Plus Programmer's Reference

39

FrameWorks Programming Language

filePos is the file position of load graphics. This is used for a single load query. For a load
query on a member basis, this should be NULL.
file is the file attachment number of the model that contains the load. Zero is the master model.
memberID is the ID of the member on which the load is applied. This is used only if filePos is
NULL, indicating that this is a load query on a member basis.
Outputs
load is the load parameters including load case parameters.
id is the ID of the load.
mid is the model ID of the load.
num_loads is the number of loads on the member if member was queried. This is 1 if the load
is queried.
Description:
This function allows you to retrieve all of the attributes from a selected FrameWorks Plus load.
You can query a single load, in which case the load is identified by its file position (filePos) and file
number (file). A multiple load query can also be made by selecting a single member with loads on
it, in which case the filePos should be set to NULL and the member id and file number is passed in.
The load attributes are returned in the FPLplaceLoad structure, which is identical to the structure
used in the load placement and modification routines. The structures for this function are
described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_queryLoadCase
int aecFPL_queryLoadCase (ldcase, id, file, lcase_name);
FPLcreateLoadCase *ldcase;
long *id;
int file;
char *lcase_name;
Arguments:
Inputs
file is the file attachment number of the model that contains the load case. Zero is the master
model.
lcase_name is the name of the load case.
Outputs
ldcase is the load case structure.
id is the ID of the load case.
Description:
This function allows you to retrieve all of the attributes from a selected load case. The load case is
identified by the file attachment number (master = 0) and the name of the load case. The load
case attributes are returned in the "ldcase" structure, and the load case id number is returned in
"id". This function when given the attach partition and load case name returns the load case and
the load case id. If the load case is NULL, then only the load case id is returned. The structures for
this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.

40

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


See also:
aecFPL_queryLoadCaseList (on page 41)

aecFPL_queryLoadCaseList
int aecFPL_queryLoadCaseList (ldcase_list, num, file);
char ***ldcase_list;
int *num;
int file;
Arguments:
Inputs
file is the file attachment number of the model in which you want to query load cases. Zero is
the master model.
Outputs
ldcase_list is the array of load case names.
num is the number of load cases found in the model.
Description:
This function lists all the load cases in the file specified by the attachment number, file (master
model is 0).
Returns:
The number of load cases found (num) and an array of load case names (ldcase_list). This
function returns 0 if successful. Otherwise, it returns a nonzero error number.
See also:
aecFPL_queryLoadCase (on page 40)
Example:
char **ldcase_list;
aecFPL_queryLoadCaseList (ldcase_list, num, file);
for (i=0;i<num;i++)
{
printf("%s\n",ldcase_list[i]);
}

aecFPL_queryLoadComb
int aecFPL_queryLoadComb(ldcomb, id, file, lcomb_name);
FPLcreateLoadComb *ldcomb;
long *id;
int file;
char *lcomb_name;
Arguments:
Inputs
file is the file attachment number of the model you want to query for load combinations. Zero is
the master model.
lcomb_name is the name of the load combination you want to query.
Outputs

FrameWorks Plus Programmer's Reference

41

FrameWorks Programming Language


ldcomb is the load combination structure.
id is the ID of the load combination.
Description:
This function allows you to retrieve all of the attributes from a selected load combination. The load
combination is identified by the file attachment number (master = 0) and the name of the load
combination. The load combination attributes are returned in the "ldcomb" structure, and the load
combination id number is returned in "id". The structures for this function are described in
..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:
aecFPL_queryLoadCombList (on page 42)

aecFPL_queryLoadCombList
int aecFPL_queryLoadCombList(ldcomb_list, num, file);
char ***ldcomb_list;
int *num;
int file;
Arguments:
Inputs
file is the file attachment number of the model you want to query for load combinations. Zero is
the master model.
Outputs
ldcomb_list is the array of load combination names found in the model.
num is the number of load combinations found in the model.
Description:
This function list all the load combinations in the file specified by the attachment number, file
(master model is 0).
Returns:
This function returns the number of load combinations found (num) and an array of load
combination names (ldcomb_list). This function returns 0 if successful. Otherwise, it returns a
nonzero error number.
See also:
aecFPL_queryLoadComb (on page 41)
Example:
char **ldcomb_list;
aecFPL_queryLoadCombList(ldcomb_list, num, file);
for (i=0,i<num;i++)
{
printf("%s\n",ldcomb_list[i]);
}

42

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

aecFPL_queryMember
int aecFPL_queryMember (member, id, modelID, mem_created, mem_modified,
filePos, file);
FPLplaceMember *member;
long *id;
int *modelID;
time_t *mem_created;
time_t *mem_modified;
long filePos;
int file;
Arguments:
Inputs
mem_created is the time the member was created or NULL if not required.
mem_modified is the time of the last member modification or NULL if not required.
filePos is the member file position in bytes.
file is the file attachment number of the model that contains the member you want to query.
Master model is 0.
Outputs
member is the attributes of the member or NULL.
id is the member ID of the requested member.
modelID is the model ID of the model that contains the member.
mem_created is the time the member was created.
mem_modified is the time of the last member modification.
Description:
This function allows you to retrieve all of the attributes from a selected FrameWorks Plus member.
The member is identified by its file position (filePos) and file number (file). You may query a
member in the local model database, or one from an attached partition (file greater than 0). The
member attributes are returned in the FPLplaceMember structure, which is identical to the
structure used in the member placement and modification functions. The structures for this
function are described in ..\fwplus\fpl\inc\FPL.h.
You can also use the aecFPL_queryMember to simply return the member id and model ID by
passing a NULL pointer for member.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_queryMemberSectionTable
int aecFPL_queryMemberSectionTable (memID, memType, filenum, tables,
tableNames);
long memID;
short memType;
long filenum;
short *tables;
char (*tableName))[2][MAXFILELENGTH];
Arguments:

FrameWorks Plus Programmer's Reference

43

FrameWorks Programming Language


Inputs
memID is the member ID of the requested member.
memType is the type of member. This is either ARCcb or MEMcb.
filenum is the file attachment number of the model that contains the member. Zero is the
master model.
Outputs
tables is the table type. 1 is standard section table. 2 is user section table. table[0] for end 1 of
the member. table[1] for end 2 of the member.
tableName is the full path to and table names; tableName[0] is for end 1 of the member.
tableName[1] is for end 2 of the member.
Description:
This function returns the name and type of section table for a given member in the model or
attached model.
For member in attached models, the terms standard and user section table refer to the
standard and user table for that particular model, not the master model.
Returns:
See also:
Example:
Suppose you want to query an arc member in the master model with an ID of 10. The input would
be:
int aecFPL_queryMemberSectionTable (10, ARCcb, 0)
The output would be:
table[0]=0; /* end 1 of member belongs to the standard table */
table[1]=1; /* end 2 of the member belongs to the user section table */
tableName[0] = "c:/win32app/ingr/fwplus/esl/aisc.dat" */table for end 1*/
tableName[1] = "d:/fwproj/esl/user.dat" */table for end 2 */

aecFPL_querySectionTableInfo
int aecFPL_querySectionTableInfo (no_attch_models, tableUnits,
tableNames);
int no_attch_models;
short (*tableUnits)[MAXATTACH][2];
char (*tableNames)[MAXATTACH][2];
Arguments:
Inputs
tableNames is the names of the standard and user section libraries of the active model and all
attached models with full path.
MAXATTACH is the maximum possible attached FrameWorks Plus models.
Outputs
no_attch_models is the number of FrameWorks Plus models that are currently attached.
tableUnits is the table units for the standard and user section libraries of the active model and
all attached models. Table units are 0 for inches and 1 for millimeters.
MAXATTACH is the maximum possible attached FrameWorks Plus models.
Description:

44

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


This function returns information about units and names of the standard table and user section
table of the active model and all attached FrameWorks Plus models.
Returns:
See also:

aecFPL_querySolid
int aecFPL_querySolid (*solid, *id, *mid, filePos, file);
FPLplaceSolid *solid;
long *id;
int *mid;
long filePos;
int file;
Arguments:
Inputs
filePos is the file position of the solid graphics.
file is the file attachment number of the model that contains the solid. Zero is the master
model.
Outputs
solid is the FPL solid element parameters or NULL.
id is the member ID of the solid.
mid is the model ID of the model that contains the solid.
Description:
This function allows you to retrieve all of the attributes from a selected FrameWorks Plus solid
member. The member is identified by its file position (filePos) and file number (file). You can query
a solid member in the local model database, or one from an attached partition (file> 0). The
member attributes are returned in the FPLplaceSolid structure, which is identical to the structure
used in the solid member placement and modification functions. You can also use the
aecFPL_querySolid to simply return the solid member id by passing a NULL pointer for solid. The
structures for this function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_querySolidDataEx
int aecFPL_querySolidDataEx (*solid, *id, *mid, filePos, file);
FPLSolidDataEx *solid;
long *id;
int *mid;
long filePos;
int file;
Arguments:
Inputs
filePos is the file position of the solid graphics.

FrameWorks Plus Programmer's Reference

45

FrameWorks Programming Language

file is the file attachment number of the model that contains the solid. Zero is the master
model.
Outputs
solid is the solid data structure.
id is the member ID of the solid.
mid is the model ID of the model that contains the solid.
Description:
This function allows you to retrieve all of the attributes from a selected FrameWorks Plus solid
member. This function is similar to aecFPL_querySolid but return much more information. The
member is identified by its file position (filePos) and file number (file). You can query a solid
member in the local model database, or one from an attached partition (file greater than 0). The
member attributes are returned in the FPLplaceSolidDataEx structure. The structures for this
function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_querySolidType
int aecFPL_querySolidType(id, file, *type);
long id;
int file;
int *type;
Arguments:
Inputs
id is the member ID of the solid.
file is the file attachment number of the model that contains the model. Zero is the master
model.
Outputs
type is the solid member type. 5 is slab. 6 is wall. 8 is solid. 9 is a slab hole. 10 is a wall hole. 12
is a solid hole.
Description:
This function retrieves the type of solid.
Returns:
This function returns 0 if successful. Otherwise, it returns a non-zero error number.
See also:
Example:
{
long solidID;
int file=0, type, sts=0;
.
.
.
sts=aecFPL_querySolidType(solidID, file, &type);
.
.

46

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language


.
}

aecFPL_readUsrData
int aecFPL_readUsrData(id, size, data, type);
int id;
int *size;
char **data;
int type;
Arguments:
Inputs
id is the member ID of the member to read user data from.
Outputs
size is the size of the user data read from the member in bytes.
data is the user data that was read from the member.
type is either MEMuid, SLABuid, WALLuid, or ARCuid.
Description:
This function reads the user data attached to a member. If it is successful, size is set to the size of
the record read, and data points at the record. The "data" parameter should be freed using free
(data) when it is no longer required.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPL_splitMember
int aecFPL_splitMember(id, fileNum, locatePt)
long id;
int fileNum;
Dpoint3d *locatePt;
Arguments:
Inputs
id is the member ID of the member to split.
fileNum is the attachment number of the model that contains the member you want to split.
Zero is the master model.
locatePt is the point at which you want to split the member and can be obtained by the
appropriate MDL function call along with a data point being entered from the mouse cursor.
Description:
This function splits a single FrameWorks Plus member into two members. The structures for this
function are described in ..\fwplus\fpl\inc\FPL.h.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:
aecFPL_joinMembers (on page 32)

FrameWorks Plus Programmer's Reference

47

FrameWorks Programming Language

aecFPL_updateUsrData
int aecFPL_updateUsrData(id, size, data);
int id;
int *size;
char *data;
int type;
Arguments:
Inputs
id is the member ID.
size is the size of the user data to update in bytes.
data is the user data to add to the member.
Outputs
type is either MEMuid, SLABuid, WALLuid, or ARCuid.
Description:
This function updates user data to a member. The size should be the size of the user data in bytes.
This function is only successful if user data already exists on a member, and the size of the new
data is less than or equal to the size of the existing data.
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:

aecFPLState_setFunction
int aecFPLState_setFunction(state, userFnc);
int state;
int(*userFnc)( );
Arguments:
Inputs
state is the state to watch for. Currently, the only state supported is
STATE_FWMEMBER_ADD.
userFnc is the user function to call when a FrameWorks Plus member is added.
Description:
This function sets a user function to call when a FrameWorks Plus state is encountered. After this
routine is called, anytime a FrameWorks Plus member is added, the function userFnc is called
with the argument of the member id: userFnc( int id );
Returns:
This function returns SUCCESS (0) if successful. Otherwise, it returns a non-zero error number.
See also:
See defudata example in fw\fpl\examples\userdata directory.

48

FrameWorks Plus Programmer's Reference

FrameWorks Programming Language

FPLonData
void FPLonData (db, msg, point, vno);
DialogBox *db;
unsigned long msg;
Dpoint3d *point;
int *vno;
Arguments:
Inputs
db is the pointer to the dialog box.
msg is the message to send to the dialog box upon a data point.
point is a pointer to variable to load with the point coordinates (or NULL).
vno is a pointer to vno to load with view of point (or NULL).
Description:
This function is used in FPL programs that use a dialog box for data entry. This function can be
called from a dialog box hook function, to establish "messages" to be sent to the hook function on
data point events. Refer to the stair.mc program for an example of how this functions can be used.
Returns:
See also:

FPLonKeyin
void FPLonKeyin (db, msg, fmt, var);
DialogBox *db;
unsigned long msg;
char *fmt;
void *var;
Arguments:
Inputs
db is a pointer to the dialog box.
msg is the message to send to the dialog box upon a key- in.
fmt is a format specifier to use in interpreting the keyed in data (or NULL).
var is the pointer to a variable to load with the key-in value (or NULL).
Description:
This function is used in FPL programs that use a dialog box for data entry. This function can be
called from a dialog box hook function, to establish "messages" to be sent to the hook function on
key-in events. Refer to the stair.mc program for an example of how this functions can be used.
Returns:
See also:

FPLonReset
void FPLonReset (db, msg);
DialogBox *db;
unsigned long msg;

FrameWorks Plus Programmer's Reference

49

FrameWorks Programming Language


Arguments:
Inputs
db is a pointer to a dialog box.
msg is a message to send to the dialog box upon a reset.
Description:
This function is used in FPL programs that use a dialog box for data entry. This function can be
called from a dialog box hook function to establish "messages" to be sent to the hook function on
reset events. Refer to the stair.mc program for an example of how this functions can be used.
Returns:
See also:

FPLsetSymb
void FPLsetSymb( element, symb );
MSElement *element;
Symb
*symb;
Arguments:
Inputs
element is the element to change symbology on.
symb is the symbology structure to apply to the element.
Description:
This function set the symbology on an element passed in. The structures for this function are
described in ..\fwplus\fpl\inc\FPL.h. This is a general MDL utility.
Returns:
The function is void and returns nothing.
See also:

50

FrameWorks Plus Programmer's Reference

SECTION 2

Parametric Modeling Language


When modeling a structure, it is common to use the same component several times with only
slight variations between them, for example, a ladder. A particular ladder could be used many
times in a project, having the same geometry but varying in length. The Parametric Modeling
Language (PML) was developed to help place components of this type, which may be
geometrically similar but require modifications to a number of parameters. PML incorporates
FrameWorks Plus commands and data into a programming language for the development of
programs to parametrically place structural components. These programs can be used repeatedly
on a project to easily model such items as stairs, ladders, cages, platforms, joists, and trusses.
The Parametric Modeling Language (PML) was original written for Intergraph's Structural
Modeling System (SMS) software that ran on the VAX. PML was later ported to run with MicasPlus
ModelDraft on an Intergraph CLIX workstation. Now, PML programs have been ported and
modified to run with FrameWorks Plus on the Windows operating system. PML programs that
were written for MicasPlus ModelDraft can be used with FrameWorks Plus with exceptions as
noted in this document.

An Efficient Modeling Tool


Using PML, a structural assembly can be generically defined in terms of geometric relationships
between structural components. The specific component parameters; section sizes, component
lengths, placement position, and orientation; can be defined as variables within the PML program.
These parameters can then be assigned specific placement values according to a specific
project's requirements. PML provides great flexibility in the definition of component parameters.
The assignment of component data such as section sizes, solid element's thickness, member
class, and member cutback orientation and distance can all be set by the user before placing
graphics.

What's Different about PMLs in FrameWorks Plus


Probably the major difference in the way PMLs work in FrameWorks Plus is how PMLs
communicate with FrameWorks Plus. ModelDraft communicated with PMLs and tutorial via
user-commands. FrameWorks Plus' PML feature is a standalone MDL (fwppml.ma). This does
have an impact on users existing PMLs. Tutorials communicate with FrameWorks Plus strictly
through the MDL. For this reason, existing PML tutorials that worked fine with ModelDraft will not
work with FrameWorks Plus. However, most ModelDraft PML tutorials can be converted within
minutes.
Additionally, FrameWorks Plus does not support certain ModelDraft commands. If you attempt to
execute commands that are not supported, a "This command not supported in FrameWorks Plus"
error will result.

Delivered PML Example Programs


The example PML's listed below, most of which were originally delivered with ModelDraft, are
delivered with FrameWorks Plus in the ..\fwplus\pml directory. There is also a sub- directory called
verified which contains many more very simple PMLs. These are all working PMLs that perform
very little, however, can be useful as examples for syntax. The majority of PML commands have a
PML in this directory, which describes its usage.

FrameWorks Plus Programmer's Reference

51

Parametric Modeling Language

grade_bm.pml -- This places grade beams as solid FrameWorks Plus elements, with or
without brick ledges. After selecting Place graphics, give two data points to define the length,
and a third data point to position the grade beam. (Tutorial driven)
hanger.pml -- This PML was never delivered with ModelDraft, however, this is a good
example of how quickly a large structure can be built and placed with PMLs (No tutorial).
joist.pml -- Although this Steel Bar Joist PML is not practical for creating drawings of bar
joists, it is useful for interference checking and visualization (rendered images are impressive).
The reason this PML is not good for drawings is that the bar joist(s) created are made up of
individual angles and round bars. The resulting members do not act as a unit. After selecting
Place graphics, give two data points to define the length, and a third data point to position the
joists(s). (Tutorial driven)
ladder.pml -- Users may find this PML useful for placing vertical ladders (Tutorial driven).
orth.pml -- The mother of all PMLs. Same as the ModelDraft PML, which was the same as the
SMS PML. This PML places an orthogonal building with user defined bay spacing, number of
bays and number of floors. (Tutorial driven).
stair.pml -- Similar to the stair PML delivered with ModelDraft, however, the "Recalculate"
option is removed. Because of the differences between ModelDraft and FrameWorks Plus,
this type of communication with a tutorial is no longer possible. (Tutorial driven)
plinth.pml -- This PML places column piers with or without a brick ledge (Tutorial driven).

Commonly Asked Questions


Why won't my ModelDraft PML tutorials work in FrameWorks Plus?
Chances are because you have not converted them to work with FrameWorks Plus. You may
want to look at the "orth.pml" example.
Can I place area and volume elements with FrameWorks Plus PMLs?
Yes, however you should become familiar with the way FrameWorks Plus handles *solid*
elements (and not areas and volumes). You may want to look at vol.pml and area.pml in the
"verified" directory.
What about holes in area elements?
FrameWorks Plus provides similar capabilities as ModelDraft in that you can place a hole in the
last placed element (which was placed with a plc_area command). See the area.pml example in
the verified directory.
What commands are supported with ModelDraft PMLs, but not with FrameWorks Plus?
A brief list includes:
ascii
close
delete
help
inquire
message
mdr_cmd
read
save
section table_name
translate
wakeup
Are the assembly commands supported in FrameWorks Plus?
Yes! Although, they work much like the group commands, and FrameWorks Plus does not
recognize assembly numbers.

52

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Can I use the run_image command to kick off external programs?
Yes. See the example pml freecell.pml in the verified directory. Modify this pml to specify an
executable you want to run.
Will PMLs be enhanced in future versions of FrameWorks Plus?
PMLs were ported to work with FrameWorks Plus to help users retain as much equity as possible
in the custom PMLs they have invested in. Although critical bug fixes will be made for
FrameWorks Plus PMLs, the recommended programming language for customer use is FPL.
Are FPLs better than PMLs?
Yes, definitely. Although more difficult to write, FPLs are much more powerful. Users considering
new development of PMLs are strongly encouraged to consider FPLs.
Name some things FPLs support that PMLs do not.
Place, modify, query on loads. FPLs also provide you with access to the same data structures as
the FrameWorks Plus product (see fpl.h). Additionally, every function in the MicroStation MDL
Reference Guide is available to you.

A Versatile Programming Language


A PML program is written similar to a program written in a high-level language such as C. In fact,
much of the PML program resembles a program written in C. PML supports common
programming concepts such as conditional statements, looping capabilities, variable definitions,
expression evaluation, and modeling-specific commands.
A unique PML feature is the ability to define the PML environment. Three environment files control
such items as where error .log files are created, what units are used for creating assembly data,
and most significantly, what syntax is used for every PML command.
The pml_lang.md file defines an alias for all PML commands. By using this file, a PML program
can be tailored to any language or abbreviation scheme you want.
Similarly, the pml_msg.md file provides the same capability to redefine all PML system messages.
The pml_wkup.md file defines default parameters for PML execution, such as the location of the
error .log file generated by PML each time a PML program is executed, as well as the directories
that are used when running a PML program.
There are two general command types available in the programming language. The first type is
the basic programming statement: variable declarations, arithmetic expressions, conditional
statements, and looping statements. The second type gives PML its unique capabilities. These
commands provide the ability to place structural components in a FrameWorks Plus model file,
copy groups of components, place graphics in tentative mode, and retrieve cross-section data
from an InterSect data file. The combination of these two command types provides an extremely
flexible environment in which to solve structural modeling problems.

FrameWorks Plus Programmer's Reference

53

Parametric Modeling Language

PML Program Development


The first step in developing a PML program is to clearly and precisely define the program's
problems and objectives. This is followed by creating algorithms that solve the problems and
achieve the objectives.
Generally, PML programs begin with the declaration and initialization of variables. Variables are
used for arithmetic computations and as arguments to be passed to functions and commands
provided by PML.
For example, the program has expressions that calculate member end points based on algorithms
defined in the program. Conditional statements direct the program execution flow to alter the
calculations and command calls based on the rules and values of variables. If, for instance, a PML
program is written for placing a stairway, a conditional statement could be used to alter the
program execution to place a platform when the stairway height or running distance exceeds a
particular value. In addition, repetitive operations such as placing stair treads at a defined delta
distance can be efficiently performed through the use of PML's looping capabilities.
Preliminary development should include user interface design. The user interface is important
because the purpose of writing a PML is to parametrically model an assembly so that the specific
placement data can be defined to meet a number of design constraints.

The PML User Interface


Tutorials provide a user-friendly interface to the PML program and are created to meet the
requirements of the specific PML program. Variables can be identified on the tutorial for modifying
data, and graphics can used to convey a visual representation of the component being defined. In
addition, the program should prompt the user for input and display status information.
The PML development is tightly integrated with the capability provided by tutorials. Included in a
variable definition is the tutorial field number in which the variable data is displayed. These field
numbers and their locations in the tutorial are an important part of the program development. In
addition to defining the tutorial field number, PML allows you to define the prompt to display when
the variable is selected for modification. This allows for the full customizing of a PML program.
PML provides a basic tutorial template that can be copied and used as a starting point for tutorial
development. This helps to keep the format of all the PML tutorials consistent with the PML
programs delivered with FrameWorks Plus. The PML Tutorial Utilities are a part of this tutorial
template. These utilities are used to instruct the system to place model components, refresh the
model components after a view manipulation, provide an easy method of setting the assembly
orientation through a set of rotate commands, and to allow the user to define a linear dimension
through graphical input.
In the PML program, a tutorial is activated with the tutor command, which has two arguments.
These two arguments are used to define the tutorial name and the cell file from which the tutorial
should be retrieved (tutorials are stored as cells in a cell file). The number of tutor commands
within a PML program is not limited, so by executing multiple tutor commands, the assignment of
parametric data can be divided into any organization using any number tutorials, which helps
prevent the graphics on a tutorial from becoming congested.

Debugging a PML Program


As with all programs, PML programs will probably not be written error-free on the first try. A certain
amount of time will be required to debug the program. You can use the evaluate verify = "yes"
command to inspect variables and settings.

54

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


In This Section
To run a PML program ................................................................... 55
PML Recommended Methodology ................................................ 56
Programming in PML ..................................................................... 57
PML Commands ............................................................................ 67
PML Tutorials ................................................................................. 119

To run a PML program


1.
2.
3.
4.

Click File > PML Application.


Select the PML program you want to run.
Click OK.
Define the PML's needed information.
By default, PML programs are delivered in ..\fwplus\pml.

FrameWorks Plus Programmer's Reference

55

Parametric Modeling Language

PML Recommended Methodology


Because of the infinite variety of methods for developing a PML program, it is impossible to define
how to write a PML program in specific terms. Instead, we would like to offer some advice on how
to approach PML programming from a problem-solving point of view.

Figure 1: PML Program Development Workflow

Defining The Problem


The first step in developing a program is to define what you want to accomplish. Sketch out the
structural assembly you want to place, and divide it into logical parts. Think through the placement
process to determine the most efficient way of building the assembly, making use of such features
as copying and mirroring.
Next, define the number and kinds of parameters needed from the user to create such an
assembly. Sketch out a preliminary user interface, including graphics and fields. Think through
what kinds of information are needed to construct the assembly, and define some default values
for the parameters.

56

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Writing The PML Program
After determining what it is you want to accomplish, it is time to begin programming. We offer the
following outline to program a PML script:
1. Sketch out the program's user interface. This determines the number of parameters needed,
the defaults you want to use, and the field position for defining field numbers.
2. Assign variable names to the parameters needed. Since you have sketched out the field
numbers needed, associate these numbers with the variable names.
3. Determine the needed tutorial prompts to gather the necessary information from the user.
4. Outline how the program will process the information from the parameters entered (or default
values) on the tutorial.
5. Outline how the placement commands will use the information processed to place the
components.
6. Write the program. It is a good idea to place comments throughout your code to explain what
is going on. Thoroughly commenting your code helps you as well as any subsequent
programmers to understand the purpose and flow of the different program parts. This reduces
the time required to maintain the program.

Building The PML Tutorial


Following the instructions in PML Tutorials (on page 119), construct the PML program user
interface. Remember to make your graphics clear and simple and your parameters easy to read. If
your tutorial becomes too crowded, determine which parameters you need first, then divide your
program into two or more parts, and design subsequent tutorials.
For efficient tutorial development, use the tutorial template delivered with FrameWorks Plus. This
ensures that your tutorial is the correct size and keeps your tutorial consistent with the tutorials in
the delivered PML programs.

Debugging In Graphics
Once your PML program is written and the tutorial created, it is time to debug in graphics mode.
Now is the time to test your program to the fullest extent. Test all fields by entering very large or
very small values to see how it reacts (do not forget zero and negative numbers). Evaluate the
prompts to determine if they are asking for the correct information at the right time. In general, try
anything that the user might do that could kill the program.
Check the graphics placed by the program carefully to verify that everything was placed the way
you intended. If you chose to keep the tutorial utilities provided on the tutorial template, test them
to verify that they are working correctly.

Programming in PML
The main purpose of any PML script is to use the Place (plc_*) commands to place beams,
braces, columns, solids, and holes. The main function of all the other commands is to facilitate
member placement. In addition to the graphical placement commands, a full complement of
traditional and PML-specific commands are available to develop PML programs.

FrameWorks Plus Programmer's Reference

57

Parametric Modeling Language

The PML Commands


The commands described in the following section are explained in detail and are alphabetically
arranged in PML Commands (on page 67).

Placement Commands
The main objective in developing a PML program is to define a structural assemblage in
parametric terms. These parameters can later be set, resulting in the placement of model
components in a graphic database. The placement of these model components is achieved
through the use of seven PML commands for the placement of each member or component type
supported by FrameWorks Plus. These commands are:
1. plc_beam
2. plc_area
3. plc_column
4. plc_hole
5. plc_brace
6. plc_volume
7. plc_arc
These commands are similar to one another; however, because different components are being
placed, each has unique characteristics required for definition. A complete list of arguments for
each of these commands is provided in PML Commands (on page 67). For each PML placement
command, there are required arguments that when combined, allow you to define all component
definition parameters.
In addition to the placement of FrameWorks Plus model components, MicroStation primitive
graphics can also be placed using the following PML commands:
1. plc_line
2. plc_linestr
3. plc_prim_arc
4. plc_shape
5. plc_text

Grouping Commands
The grouping of elements is useful in conjunction with the Copy Group command for building
components. The group commands are:
1. start_group
2. end_group
The Start Group command signals the system that all subsequent elements, until an End Group
command is encountered, are to be assigned the same group number. These grouping
commands may be nested for more efficient element placement.

Assembly Commands
The assembling of elements is useful in conjunction with the Copy Assembly command as well as
for adding elements to existing assemblies. The assembly commands are:
1. start_assem
2. end_assem

58

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


The start_assem command signals the system that all subsequent elements until an end_assem
command is encountered are to be assigned the same assembly number. Assembly commands
can also be nested, even within groups.
Assembly numbers are not used in FrameWorks Plus. This command is available only for
compatibility with ModelDraft PMLs.

Copy Commands
The copy commands are used to copy elements, groups, and assemblies any number of times.
The copy commands are:
1. copy_last_elem
2. copy_group
3. copy_assem

Looping Commands
There are two basic types of looping structures supported by PML: DO and WHILE. The looping
commands are:
1. do
2. while
3. enddo
4. endwhile
The DO structure loops a specified number of times while the WHILE structure loops until a certain
condition is satisfied. Defining the number of times a DO structure will loop requires an integer
variable set to an initial value and the end value. Although infinite DO loops are not valid, negative
or backward decrementing is valid. Also, WHILE loops can be nested up to ten deep.

Conditional Statements
Only relational operators are valid for conditional statements, and no nesting is permitted. String
comparisons are performed via the STRCMP function. The conditional statements are:
1. if
2. elseif
3. else
4. endif
IF and ELSEIF statements require a condition. ELSE and ENDIF do not have any keywords.

Setting Default Values


The Default command is used to set the default values to be used by a particular PML program.
For every variable that is defaultable in a command, the system looks for a value in either the
Default or Section command. If none is found, then it is assumed to be null. Issuing the Default
command with no arguments and the Evaluate command set to On shows all of the system
defaults.

Member Sections
PML programs use the steel table that is currently active. This steel table is selected using the File
> Section Library command in FrameWorks Plus. This also acts as the default section command.
The active section is the last one placed in the design file.

FrameWorks Plus Programmer's Reference

59

Parametric Modeling Language


Setting Units
The Units command is used to define the units for both input (PML file) and output (.log file) of
linear and angular variables. That is, if the linear_input units are defined as inches, then the end
points of a beam line, for example, will be defined in the local coordinate system (which can be set
within the PML program) relative to its origin in inches. Note, however, that data is stored in one
unit only, as defined in the wakeup file as the save units. The Units command affects the
placement commands only.

Assigning Values To Variables


The Assign command is used to assign values to variables. The command is also used to
suppress or initiate the calculation of numeric or string expressions as well as to assign field
numbers to variables for use in tutorials.

Setting Limits To Variables


The Bounds command is used to set limits on the values assigned to variables. When the set
bounds are exceeded, an asterisk appears next to the value on the tutorial.

Activating A Tutorial
The Tutor command is used to activate the tutorial for the PML program. It is through this tutorial
that variables are assigned new values by the PML user. When satisfied with the parameters, the
user can select the Place Graphics field to place the component created in the PML program in the
design file. Messages and prompts are displayed to the user through the tutorial. Instructions on
creating a tutorial and assigning field numbers are described in detail in PML Tutorials (on page
119).

Displaying Graphics
The Show Graphics command is used to display graphics on the screen. By default, if the Show
Graphics command is not issued, elements are written by default to the screen at the end of the
script execution.

Capturing And Using Screen Coordinates


The Origin command is used to capture screen coordinates and the structure origin. This
command maps your coordinates to those of the main model. In addition, any time this command
is issued, coordinates entered can be returned to the PML program.

Reading/Writing To A Binary File


This feature in not supported in FrameWorks Plus.

Reading/Writing To An ASCII File


Reading and writing to an ASCII file is accomplished with the Scan and Write commands. These
commands are used to read or write ASCII data on user-defined files and are used in conjunction
with the Open and Close commands.

Translating Between Languages


This feature is not supported in FrameWorks Plus.

60

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Debugging
The Evaluate command, when set to On, is used to dump all error messages and list any
command data to a .log file.

Exiting
The Exit command is used to end the PML file execution.

Help
This feature is not supported in FrameWorks Plus.

Language
This feature is not supported in FrameWorks Plus.

Converting To ASCII
This feature is not supported in FrameWorks Plus.

Strings
To assign strings to variables, enclose the string in double quotes. If no quotes are found by PML,
it is assumed to be a previously defined string variable.

Prompts
Prompts and messages can be displayed using the Message command. The string or value
entered in response to the prompt can then be stored in a variable.

Running Executables
Programs written in languages such as C or Fortran can be accessed while running a PML script.
These programs can be called to perform the extensive calculations required by some algorithms.
The results are written to an output file and the PML command Scan can read this data and store
it in PML variables.

Inquiring on FrameWorks Plus Elements


The Inquire command can be used to retrieve information on existing FrameWorks Plus elements.
This command retrieves information such as area, starting and ending coordinates, vertices,
class, element type, section size, material, grade, and so forth. After selecting a member, the data
retrieved can be assigned to PML variables and used for the placement of subsequent members.
Refer to Inquire (on page 90), for more information on the Inquire command.

Linear Components - Beam, Brace, Column


Each of the linear component placement commands is used to place a single member line with an
optional single cross-section in the graphical database. The required arguments for these
commands are the two-member line endpoint coordinates, all other parameters can be defaulted
through the use of the Default command or the active parameters in FrameWorks Plus.

FrameWorks Plus Programmer's Reference

61

Parametric Modeling Language

Arc Components - Beam, Brace, Column


The Place Arc command is different from the Place Beam, Place Brace, and Place Column
commands in that the member type is passed as an argument rather than defined by the
command name itself. In addition, the definition of an arc requires more than two end points;
therefore, the required arguments are different. Like the Place Beam, Place Brace, and Place
Column commands, the Place Arc command can only have one cross-section per member line
and all other parameters can be defaulted. The required arguments for the Place Arc command
are:
A vector normal to the plane on which the arc lies.
Arc origin point or point at equal distance from any point on the arc.
The start point of the arc or a point on the arc from which the arc is swept.
The sweep angle or distance measured in degrees from the start point of the arc to its finish
point.
The sweep angle is positive from the start point about the normal vector, when using the
right-hand rule.

Area Components - Solids and Holes


Area components are defined by passing in, using the vert#= argument, the vertices of one planar
surface of the area element as a shape. The ordering of the vertices must be such that the first
vertex is connected to the second, which is connected to the third, and so forth. It is not necessary
to close the shape because PML will ensure that the shape is closed before placing it. In addition
to the ordering of the vertices for connectivity, the direction about which the vertices are given
determines the direction, either into or out of the plane of the shape, by which the thickness is
applied. We recommend that you place area elements by centroid rather than a face, to avoid
placement difficulties.
The thickness direction is determined by the right-hand rule as you traverse the shape perimeter
about a point within the shape. A clockwise direction results in the thickness being projected into
the plane, and a counter-clockwise direction projects out of the plane. A hole thickness does not
need to be the same thickness as its parent solid, making a partial hole definable.
In order to place a hole, a solid must have been previously placed within the same PML program.
The last solid placed before to placing the hole becomes the parent solid. The hole must be within
the definition of the solid.
The above information on placing area elements is provided to maintain consistency with
ModelDraft. After area elements are placed in the FrameWorks Plus model, they are no longer
recognized as area elements. Refer to the FrameWorks Plus Reference Guide for a description of
solid elements.

62

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Volume Components
The choice of placing area elements versus volume elements is up to you. All area elements can
be placed as volume elements. An area element is a component defined by a single planar shape
that is projected normal to the plane to produce a three-dimensional entity. Volume elements do
not follow the same strict interpretation. They do, however, have to conform to certain criteria.
A volume element is a component that is defined by two planar surfaces, which need not be
parallel or of the same geometric shape or size. However, the two surfaces must contain the same
number of vertices and must be ordered in the same fashion.
When placing a volume element with PML, the vertices are all defined sequentially using the
vert#= argument. The vertices for shape 1 are given first, followed by the vertices for shape 2. The
shapes need not be closed because PML will ensure that the shapes are closed before
placement. However, the same number of vertices must be passed as arguments for both shapes.
The above information on placing volume elements is provided to maintain consistency
with ModelDraft. After volume elements are placed in the FrameWorks Plus model, they are no
longer recognized as volume elements. Refer to the FrameWorks Plus Reference Guide for a
description of solid elements.

Language File
PML uses the language file to determine the command names, key words, special words (such as
STEEL), file extensions, command separators, command terminators, section geometry
parameters, and relational operators. The master language file for PML is an ASCII file called
pml_lang.md, which resides in the \pml directory.
There is a series of records contained within the language file. The first record is the version
number. The second record consists of two characters; the first is the comment character used for
this file, and the second character is the separator used for this file. The other records in the file
can be altered at your discretion and are currently grouped in logical segments using the syntax
category, key_word, alias.

Wakeup File
The wakeup file is used to specify the storage units and the output location of the .log files. The
master wakeup file for PML is an ASCII file named pml_wkup.md.
The wakeup file contains a series of records. The first record is the version number. The second
record consists of two characters; the first is the comment character used for this file, and the
second character is the separator used for this file. The other records in the file can be altered at
your discretion. It is in these subsequent records that the location of the .log files, the save units,
and the Bell options are specified. If the wakeup file is not found in either your project directory,
working directory, or the \pml directory, the default settings are as follows: feet, degrees, no bell,
and write .log files to your working directory where the .PML file was found.
The following key words can be used in the wakeup file to allow you to specify which directories to
look in, and in which order, when running a PML program.
pml_work -- Default or working directory - used in alpha mode
pml_hard -- First hard coded directory
pml_hard2 -- Second hard coded directory
pml_hard3 -- Third hard coded directory
pml_prod -- Product directory (..\fwplus)
asc_prod -- Product directory (..\fwplus) - used with the ASCII command
log_prod -- Product directory (..\fwplus)

FrameWorks Plus Programmer's Reference

63

Parametric Modeling Language


The order in which the key words appear determines the order in which they are searched for the
PML file name you key in. When the file is found under a directory specified by a key word, the
other key words are ignored. All six key words do not have to be used, and they can appear in any
order.

Example Syntax
fwplus
pml_proj
pml_work
!pml_hard*c:\users\default\pml*
!pml_hard2*c:\projects\pml*
pml_hard3*c:\win32app\ingr\\pml*
pml_prod

Message File
The master message file pml_msg.md is an ASCII file that contains the messages and prompts
used by PML. The system actually reads the file pml_msg.bin, which is a binary version of the file
residing on the same directory.
The message file contains a series of records. The first record is its version number. The second
record consists of two characters; the first character is the comment character used in this file, and
the second character is the separator used in this file. The remainder of the records in this file is
many of the messages used by PML. The rest of the messages used by PML are from the
msgfile.md file, which is located in the same directory.

Current Requirements
String Size

Commands cannot be longer than 31 characters.


String evaluations cannot be longer than 64 characters.
Prompts cannot be longer than 40 characters.
Expressions cannot be longer than 80 characters.
File names cannot be longer than 64 characters.
Material grade names cannot be longer than 24 characters.
Material names cannot be longer than 32 characters.
Variable names cannot be longer than 24 characters.
Messages in pml_msg.md cannot be longer than 75 characters.
Records cannot be longer than 1024 characters.
Section names cannot be longer than 32 characters.
Section names cannot contain a double-quote ["] character. If you need a double-quote
character in the section name, use two single-quote ['] characters instead.
Tutorial cell names cannot be longer than 6 characters.
Element names cannot be longer than 24 characters.
Element user attribute names cannot be longer than 32 characters.

Looping

64

While loops can be nested up to 10 deep.

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Do loops can be nested up to 10 deep.


Nesting between Do, If and While structures is allowed.

IF Structures

IF structures cannot be nested and only relational operators can be used.

Assemblies And Groups

The maximum number of nested assemblies is 3.


The maximum number of nested groups is 6.
The combined maximum number of nested assemblies and groups is 6.
The combined maximum number of assemblies and groups is 50.

Copying

The maximum number of elements to be copied with new assembly numbers at one time is 50.
If no new assembly numbers are specified, there is no limitation.

Element Vertices

The maximum number of vertices per area/hole element is 50.


The maximum number of vertices per volume element is 95.

Expression Precedence

The maximum number of expression precedence is 50.

Tutorial Field Numbers

Field numbers 1 through 199 are reserved for users.


Field 200 is reserved for the tutorial error messages.
Field 201 is reserved for the tutorial header.
Field 202 is reserved for the place and refresh graphics utilities.
Field 203 is reserved for the tutorial prompts.
Field 204 is reserved for the rotation about the x-axis utility.
Field 205 is reserved for the rotation about the y-axis utility.
Field 206 is reserved for the rotation about the z-axis utility.
Field 207 is reserved for the define rotation angle utility.
Field 208 is reserved for the define distance by two points utility.

Invoking Different Tutorials

Every issuance of a Tutor command invokes and brings up a tutorial. There are no limits to the
number of tutorials that can be invoked in a single PML program.

FrameWorks Plus Programmer's Reference

65

Parametric Modeling Language

Section Orientation
The mirror argument on the Place Beam, Brace, and Column commands is used in conjunction
with the cross-section orientation vector to define the orientation of a cross- section. In general, a
section can be mirrored about either a local X and/or Y-axis. The following illustration shows the
relationship between the orientation vector and the mirror status and assumes that all sections
were placed using Cardinal Point 1:

66

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

PML Commands
This section contains all of the PML commands listed in alphabetical order and includes: a syntax
example with the optional arguments shown in brackets, a description of command usage, a
description of the various command limitations, and a listing of the optional arguments with a brief
definition of their meaning.

Command Conventions
The following documentation conventions are used throughout the command descriptions in this
chapter:
I -- An expression or variable evaluating to an integer.
R -- An expression or variable evaluating to a real.
S -- An expression or variable evaluating to a string. All alpha characters must be surrounded
by double quote marks ("). Arguments only accept a specified number of characters, which
includes the quotation marks surrounding the string.
variable_name -- Represents any variable name you want, but must be limited to 24
characters.
file_name -- Represents any file name you want, but is limited to 64 characters.
[ ] -- Arguments between brackets are optional and have built-in defaults.
() -- Default values for arguments (empty parenthesis indicate a null character or a carriage
return).

FrameWorks Plus Programmer's Reference

67

Parametric Modeling Language


Arithmetic Operators
The following arithmetic operators are supported by PML and are listed in hierarchical order from
highest to lowest:
- -- Unary minus
( ) -- Parenthesis
** -- Raise to the power of
* and / -- Multiplication and Division
+ and - -- Addition and Subtraction
When the parts of an equation are equal in the hierarchy, then they are evaluated from left to right.
Example Syntax
assign a = 2;
assign b = 3;
assign c = 4;
assign x = a + b * c;
! VALUE = 14.0000
! b * c = 12
! a + 12 = 1
assign x = (a + b) * c;
! VALUE = 20.0000
! a + b = 5
! 5 * 4 = 20
assign x = a * b / c;
! VALUE = 1.5000
! a * b = 6
! 6 / 4 = 1.5
assign x = (-a + b)**2 + c * 4;
! VALUE = 17.0000
!
-a = -2
! -2 + 3 = 1
! 1 **2 = 1
! c * 4 = 16
! 1 + 16 = 17.O0
assign x = -b ** 3 / c * 2;
!
VALUE = -13.5000
!
-b = -3
!
-3 ** 3 = -27
!
-27 / c = -6.75
! -6.75 * 2 = -13.5
assign x = (-b **3) / (c * 2);
!
VALUE = -3.3750
!
-b = -3
! -3 ** 3 = -27
!
c * 2 = 8
! -27 / 8 = -3.3750
assign x = (-b **3) / (c * 2) + a;
!
VALUE = -1.3750
!
-b = -3
!
-3 ** 3 = -27
!
c * 2 = 8

68

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


!
-27 / 8 = -3.3750
! -3.3750 + 2 = -1.3750
In general, do not place a negative sign within an equation along with another operator.
Instead of taking the negative of a variable and then multiplying it by another variable, isolate the
operations by multiplying with one set of parentheses and the negating with another set of
parentheses.
Instead of: (dx * s_ang)+(-dy * c_ang)
Use: ((dx * s_ang) - (dy * c_ang))

Relational Operators
The following is a list of the relational operators supported by PML:
The expression itself -- True
! -- Not true (zero or false)
> -- Greater than
>= -- Greater than or equal to
< -- Less than
< = -- Less than or equal to
== -- Equal to
!= -- Not equal to
At least one blank character must be on either side of an operator.

Math Functions
The following mathematical functions are supported by PML:
sin, cos, tan -- Sine, Cosine, Tangent
acos, asin, atan -- Arccosine, Arcsine, Arctangent in radians
acosd, asind, atand -- Arccosine, Arcsine, Arctangent in degrees
int and nint -- Integer and Nearest integer
sqrt -- Square Root
abs -- Absolute Value
log -- Natural Logarithm
log10 -- Common Logarithm
Example Syntax
assign x_copies = int ( srise / trise), var_typ = "int";
assign steprun = setup / (tan (angle));
assign x1 = radius * cos (theta / 2);
assign z1 = radius * sin (theta / 2);
assign angle = atan ((srise - (stepup/12)) / srun) * (180 / pi);
plc_beam end1 = x1, 0, z1, end2 = x1, spacing, z1, xsec_orient_vec = cos
(ang), 0, sin (ang);

Special Constants
The following special constants are supported by PML:
p -- Pi
exp -- Natural Exponential Function (e)

FrameWorks Plus Programmer's Reference

69

Parametric Modeling Language


Special Characters
The following special characters are supported by PML by default:
, -- Argument separator
; -- Command line terminator
! -- Comment character
"" -- Used to surround literal strings
? -- Directory separator for use in logicals
& -- Used to compare, concatenate and make strings (see the String Compare, String
Concatenate, and String Make commands).

Special Functions
The following special string manipulation functions are available:
strcmp -- This command is used to compare two strings to determine if they are equal. The
command returns a value of 1 if the strings are equal and a 0 if they are not.
strcat -- This command is used to concatenate strings.
strmk -- This command is used to convert numerals into strings.
Example Syntax
assign str1 = "stop", var_type = "char";
assign str2 = "go", var_type = "char";
assign x = strcmp ( str1 & str2 ), var_type = "int";
! If identical, then x = 1 otherwise, x = 0
assign x = 4, var_type = "int";
assign file = "slab", var_type = "char";
assign x_str = strmk ( x & "int" ), var_type = "char";
assign filename = strcat ( file & x_str ), var_type = "char";
assign ext = ".dat", var_type = "char";
assign tot_file = strcat ( filename & ext ), var_type = "char";
assign y = 10.234, var_type = "float";
assign y_str = strmk ( y & "float" ), var_type = "char";

Related Topics
ASCII (on page 71)
Assign (on page 72)
Bounds (on page 73)
Close (on page 74)
Copy Assembly (on page 75)
Copy Group (on page 76)
Copy Last Element (on page 78)
Default (on page 78)
Delete (on page 81)
Do (on page 81)
Else (on page 83)
Elseif (on page 83)
End Assembly (on page 84)
Enddo (on page 85)
End Group (on page 85)
Endif (on page 86)
Endwhile (on page 87)
Evaluate (on page 87)
Exit (on page 89)

70

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Help (on page 89)
If (on page 89)
Inquire (on page 90)
Language (on page 90)
Mdr (on page 90)
Message (on page 91)
Mstn (on page 91)
Open (on page 91)
Origin (on page 92)
Override (on page 93)
Place Arc (on page 94)
Place Area (on page 95)
Place Beam (on page 97)
Place Brace (on page 99)
Place Column (on page 100)
Place Hole (on page 102)
Place Line (on page 103)
Place Linestring (on page 102)
Place Primitive Arc (on page 103)
Place Shape (on page 104)
Place Text (on page 105)
Place Volume (on page 106)
Read (on page 107)
Run (on page 108)
Save (on page 109)
Scan (on page 110)
Section (on page 111)
Show Graphics (on page 112)
Start Assembly (on page 113)
Start Group (on page 113)
Translate (on page 114)
Tutorial (on page 114)
Units (on page 114)
Update (on page 115)
Wakeup (on page 117)
While (on page 117)
Write (on page 118)

ASCII
Syntax
ascii file_name

Usage
This command is not supported by FrameWorks Plus.

FrameWorks Plus Programmer's Reference

71

Parametric Modeling Language


Limitations
Arguments
Example Syntax

Assign
Syntax
assign variable_name = I, R, S
[ , auto_calc = S ] [ , field_num = I ] [ , prompt = S ]
[ , units_tut = S ] [ , var_type = S ] ;

Usage
This command evaluates the expression and assigns it to the real, integer, or string variable. The
field_num (field number) specifies that the variable can appear and be modified in a tutorial. After
a variable has been given a variable type (real, integer, or string), the type does not have to be
reestablished if the variable is reassigned.

Limitations
The variable name is limited to 24 characters and must start with an alphabetic character (not a
number). This variable name cannot be the same as any PML math function, must be
alphanumeric, and must be the first parameter of the command.

Arguments
auto_calc -- Set to Yes or No (Yes). When set to Yes, if a variable depends on another variable
and that other variable is changed to a new value, then the initial variable is updated automatically.
field_num -- This number should be between 1 and 199, inclusive. There is no default value for
this argument; if no value is given, the variable is not displayed in the tutorial (0).
prompt -- This assigns a tutorial prompt and is limited to 64 characters ().
units_tut -- This argument defines the units in which values, defined by the user in the PML
tutorial, will be assigned to a variable. This is used when defining a distance using the PML tutorial
utility Define Distance By Two Points. The two points chosen could return "FT", "IN", "M", "CM" or
"MM".
The units must be defined as FeeT, INches, Meters, CentiMeters, or MilliMeters
(unit_input_linear).
var_type -- Must be FLOAT, INTeger, CHARacter, TOGGLE, BIN_EXIT, or BIN_STAY (FLOAT).

Example Syntax

72

assign a1 = 25;
assign b2 = b1 + bay_y;
assign radius = 25.0,
field_num = 1,
prompt = "keyin radius (ft):";
assign x1 = radius * cos (theta / 2);

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

assign stepup = srise - ((trise * srun)/trun),


auto_calc = "no";
assign section_column_x = "W12x50",
var_type = "char",
field_num = 35,
prompt = "keyin section size";
assign y_length = 30.3333,
var_type = "float",
field_num = 127,
prompt = "keyin y bay dimension (ft):";
assign z_length = 10,
var_type = "int",
field_num = 170,
prompt = "keyin thickness (in):";
assign z_length = z_length * 12;
assign extension = 30.0,
units_tut = "in",
field_num = 23,
prompt = "define total length:";
assign x = 14, var_type = "float",
field_num = 12, units_tut = "FT";
assign x = 10.5,
var_type = "float",
field_num = 121,
prompt = "Enter new value";
assign y = x / 20.2,
var_type = "float",
field_num = 120,
prompt = "Enter new value for y";

Bounds
Syntax
bounds variable_name [ , max_val = R ] [ , min_val = R ] [ , enforce = S
] ;

Usage
This command sets the upper and lower bounds of the variable. If these bounds are exceeded an
asterisk ( * ) appears in the tutorial next to the field in which the variable is defined. In addition, the
ASSIGN variable must have a field_num. If the enforce argument is used, the user is forced to key
in a value within the given range.

Limitations
This command can only be issued after an Assign command using that same variable. The
variable name limitations are the same as those that apply to the Assign command. Also, the
variable must be the first parameter after the command.
For more information on the Assign command, see Assign (on page 72).

FrameWorks Plus Programmer's Reference

73

Parametric Modeling Language


Arguments
max_val -- The upper bound of the variable, which must be greater than the min_val, if one has
been assigned.
min_val -- The lower bound of the variable, which must be less than the max_val, if one has been
assigned.
variable_name -- Refers to the variable name you want to assign and is limited to 24 characters.
enforce -- Restricts the user from continuing on if the value entered is out of bounds; enforce is
turned on or off with the strings Yes or No.

Example Syntax

assign radius = 25.0,


field_num = 1,
prompt = "keyin radius (ft):";
bounds radius, min_val = 1, max_val = 50;
assign theta = 90.0,
field_num = 2,
prompt = "keyin theta (deg):";
bounds theta, min_val = 0, max_val = 360, enforce = "yes";
assign x_length = 6.1667,
field_num = 96,
prompt = "keyin x bay dimension (ft):";
assign y_length = 30.3333,
var_type = "float",
field_num = 127,
prompt = "keyin y bay dimension (ft):"; assign z_length = 10,
var_type = "int",
field_num = 170,
prompt = "keyin thickness (in):"; bounds x_length, max_val = 20; bounds
y_length, min_val = 5; bounds z_length, min_val = 1, max_val = 36;

Close
Syntax
close [ file = S ] ;

Usage
This command is used to close an external file. The external file is first opened using the Open
command (see Open (on page 91)). Data is written to the file using the Write command (see Write
(on page 118)) or read from the file using the Scan command (see Scan (on page 110)).

Arguments
file -- Defines the name of the file to be closed.

Example Syntax

74

! READ IN DATA FROM INPUT FILE


! Where the input file, swoc.in, looks like: X.Coordinate=10.5;
assign infile = "swoc.in", var_type = "char";
open file = infile, open_mode = "open_rd";

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

assign x = 1.0, var_type = "float";


assign xcoord_string = " ", var_type = "char";
scan file = infile, var1 = "xcoord_string", var2 = "x",
separator = "=", terminator = ";",
scan_mode = "scan_ascii";
close file = infile;
! WRITE TO OUTPUT FILE
! Where the output file, swoc.out, looks like: X.Coordinate=10.5000!
assign outfile = "swoc.out", var_type = "char"; open file = outfile,
open_mode = "open_wr"; write file = outfile, var1 = "xcoord_string", var2
= "x",
separator = "-", terminator = "!",
write_mode = "write_ascii"; close file = outfile;

Copy Assembly
Syntax
copy_assem assem_num = I, delta = R, R, R
[ , n_copies = I ] [ , new_assem_nums = I, I, I, . . . n ]
[ , form_type = I ] ;

Usage
This command selects all of the elements written from within the PML program that are part of the
specified assem_num (assembly number). The command then evaluates X, Y, and Z components
for delta and copies the selected elements n_copies number of times; each time incrementing the
element placement coordinates by delta. If new assembly numbers (new_assem_nums) are
assigned, the new elements will reflect that. In other words, if three copies are to be made, each
copy can have a different assembly number assigned to it.
You can have up to 50 copies of each assembly, but the new assembly numbers can only have
three unique values. If you do not specify the assembly numbers for all of the copies, the last
assembly number used will be used for the remainder of the copies. For example, if you say that
n_copies = 6, new_assem_nums = 1, 2, 3, 1 then the first three copies will be numbered 1, 2, and
3, and the remaining three copies will use the number 1.

Limitations
The n_copies argument must be issued before new_assem_nums.
Assemblies are not used in FrameWorks Plus. This command is available only for
compatibility with ModelDraft PMLs.

Arguments
assem_num -- A valid assembly number (1 through 255) that has already been created in the
PML program and has elements successfully placed in it.
delta -- The X, Y, Z increment should not all equal zero.
n_copies -- The number of copies must be greater than zero and less than or equal to 50.
new_assem_nums -- The list of new assembly numbers should be unique and greater than zero.
There should be n_copies of new assembly numbers. There have to be as many integers as there
are copies. For example, if you want 3 copies, you need 3 integers. (none)

FrameWorks Plus Programmer's Reference

75

Parametric Modeling Language


form_type -- The report format type, which should be set to zero. This argument is not used by
PML.

Example Syntax

copy_assem assem_num = 1,
delta = 0,10,0;
copy_assem assem_num = 10,
delta = 5,0,0,
n_copies = 5,
new_assem_nums = 11,12,13,14,15;
assign ladder_assem = 100,
var_type = "int",
field_num = 24;
start_assem assem_num = ladder_assem;
start_assem assem_num = ladder_assem + 1;
plc_column end1 = clearx, -cleary, 0,
end2 = clearx, -cleary, height;
plc_column end1 = x + clearx, y - cleary, 0,
end2 = x + clearx, y - cleary, height;
end_assem assem_num = ladder_assem + 1;
start_assem assem_num = ladder_assem + 2;
plc_beam end1 = clearx, -cleary, firststep,
end2 = x + clearx, y - cleary, firststep;
copy_last_elem delta = 0,0,rungspace,
n_copies = rungcopies;
end_assem assem_num = ladder_assem + 2;
end_assem;
copy_assem assem_num = ladder_assem,
delta = 0,0,height,
n_copies = 3,
new_assem_nums = ladder_assem + 3,
ladder_assem + 4,
ladder_assem + 5;

Copy Group
Syntax
copy_group group_num = I, delta = R, R, R
[ , n_copies = I ] [ , new_group_nums = I, I, I, . . . n ];

Usage
This command is used to copy components placed by PML with a specific group number. The
command copies each of the components of a group n_copies number of times; each time
incrementing the element placement coordinates by delta.
You can have up to 50 copies of each group, but the new group numbers can only have six unique
values. If you do not specify the group numbers for all of the copies, the last group number used is
used for the remainder of the copies. For example, if you say that n_copies = 10,

76

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


new_group_nums = 1, 2, 3, 4, 5, 6, 1 then the first six copies are numbered 1, 2, 3, 4, 5, and 6 and
the remaining four copies use the number 1.

Limitations
The n_copies argument must be issued before new_group_nums.

Arguments
delta -- The X, Y, Z increment should not all be equal to zero.
group_num -- A valid group number that has already been created in the PML program and has
elements successfully placed in it.
n_copies -- The number of copies should be greater than zero.
new_group_nums -- The new group numbers should be unique and greater than zero, up to a
maximum of six (none).

Example Syntax

start_group group_num = 1;
plc_column end1 = 0,0,0 ,
end2 = 0,0,12;
plc_column end1 = 10,0,0 ,
end2 = 10,0,12;
end_group;
copy_group group_num = 1,
delta = 0,10,0,
n_copies = 2;
start_group group_num = 1;
plc_column end1 = 0, 0, 0,
end2 = 0, 0, height;
start_group group_num = 2;
plc_column end1 = 5, 0, 0,
end2 = 5, 0, height;
end_group group_num = 1;
plc_beam end1 = 0, 0, height,
end2 = 5, 0, height;
end_group;
copy_group group_num = 1,
delta = 0, 10, 0;
copy_group group_num = 2,
delta = 0, -10, 0;
copy_group_num = 12,
delta = 10, 20, 0,
n_copies = 6,
new_group_nums = 1, 2, 3, 1, 2, 3;

FrameWorks Plus Programmer's Reference

77

Parametric Modeling Language

Copy Last Element


Syntax
copy_last_elem delta = R, R, R [ , n_copies = I ] ;

Usage
This command copies the last element placed n_copies number of times; each time incrementing
the element placement coordinates by delta.

Limitations
An element must have been placed successfully before using this command.

Arguments
delta -- The X, Y, Z increment should not all be equal to zero.
n_copies -- The number of copies should be greater than zero.

Example Syntax

plc_column end1 = 0,0,0,


end2 = 0,0,12;
copy_last_elem delta = 0,10,0;
copy_last_elem delta = x, y, 0,
n_copies = bays;

Default
Syntax
default [ arc_member_type = S ] [ , card_pnt_beam = I ]
[ , card_pnt_brace = I ] [ , card_pnt_column = I ]
[ , class = I ] [ , cut_dist_beam = R ]
[ , cut_dist_brace = R ] [ , cut_dist_column = R ]
[ , cut_prior_area = I ] [ , cut_prior_beam = I ]
[ , cut_prior_brace = I ] [ , cut_prior_column = I ]
[ , cut_prior_vol ] [ , delete_log = S ] [ , fab_type = I ]
[ , fireproof_thk = R ] [ , fireproof_type = I ]
[ , flooding = S ] [ , form_type = I ] [ , grade = S ]
[ , material = S ] [ , merge_id = I ] [ , mirror = I ]
[ , n_copies = I ] [ , origin_d = R, R, R ] [ , ov_parall ]
[ , plc_pnt = S ] [ , rotation_angle = R ]
[ , rounding_scr = I ] [ , rounding_log = I ]
[ , save_end = S ] [ , status = I ] [ , sweep = R ]
[ , thickness = R ] [ , xsec_orient_vec_beam = R, R, R ]
[ , xsec_orient_vec_brace = R, R, R ]
[ , xsec_orient_vec_column = R, R, R ];
The following arguments are only used by the primitive graphics commands (PLC_LINE,
PLC_LINESTR, PLC_PRIM_ARC, PLC_SHAPE, PLC_TEXT):
[ , color ] [ , font ] [ , height ] [ , just ] [ , level ]
[ , linecode ] [ , weight ] [ , width ]

78

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Usage
This command is typically issued early in the program and sets the default values.

Arguments
arc_member_type -- This argument is not supported in FrameWorks Plus and is ignored.
class -- The class should be between 0 and 4, inclusive (0, active). 0 - Primary, 1 - Secondary, 2
- Tertiary, 3 - User1, 4 - User2.
card_pnt_beam -- The cardinal point for beams should be between 1 and 15, inclusive (0, active).
card_pnt_brace -- The cardinal point for braces should be between 1 and 15, inclusive (0, active).
card_pnt_column -- The cardinal point for columns should be between 1 and 15, inclusive (0,
active).
color -- Standard MicroStation command to set the active color for primitive graphics. The value
can be between 0 and 255 (0).
cut_dist_beam -- The cutback distance for beams should be greater than or equal to zero (0).
cut_dist_brace -- The cutback distance for braces should be greater than or equal to zero (0).
cut_dist_column -- The cutback distance for columns should be greater than or equal to zero (0).
cut_prior_area -- This argument is not supported in FrameWorks Plus and is ignored.
cut_prior_beam -- The cutback priority for beams should be between 0 and 15, inclusive (0,
active).
cut_prior_brace -- The cutback priority for braces should be between 0 and 15, inclusive (0,
active).
cut_prior_column -- The cutback priority for columns should be between 0 and 15, inclusive (0,
active).
cut_prior_vol -- This argument is not supported in FrameWorks Plus and is ignored.
delete_log -- If this argument is set to yes, then the log file is deleted if the program is run
successfully. If the argument is set to no, then the log file is always created and saved. (no)
fab_type -- This argument is not supported in FrameWorks Plus and is ignored.
fireproof -- This argument is not supported in FrameWorks Plus and is ignored.
fireproof_thk -- This argument is not supported in FrameWorks Plus and is ignored.
fireproof_type -- This argument is not supported in FrameWorks Plus and is ignored.
flooding -- This argument is not supported in FrameWorks Plus and is ignored.
font -- Standard MicroStation command to set the active font. (0).
form_type -- The report format type, which should be set to zero and is not used by PML (0).
grade -- The material grade has a maximum number of characters of 24 (active; if none active,
then A36).
height -- Standard MicroStation command to set the active text height in master units (10).
just -- Standard MicroStation command to set the active text justification. The value can be 0, 1, 2,
6, 7, 8, 12, 13, and 14 (0).

level -- Standard MicroStation command to set the active level. The value can be between 1 and
63 (1).

FrameWorks Plus Programmer's Reference

79

Parametric Modeling Language


linecode -- Standard MicroStation command to set the active line style for primitive graphics. The
value can be between 0 and 7 (0).
material -- The material name has a maximum number of characters of 32 and can be either
Steel, Concrete, Aluminum, or Timber (active; if none active, then Steel).
merge_id -- This argument is not supported in FrameWorks Plus and is ignored.
mirror -- The mirror should be between 0 and 3, inclusive (0, active). 0 - No mirror, 1 - Y- axis, 2 X-axis, 3 - Both axes.
n_copies -- The number of copies should be greater than zero (1).
origin_d -- The point in the design file that all elements will be placed relative to the global origin.
(0,0,0)
ov_parall -- Specifies how the orientation vector for the area element is determined. The order in
which the vertices that form the area element were placed controls the direction of the orientation
vector according to the right-hand rule.
If this argument is set to zero, then the orientation vector will follow the right-hand rule. If the
argument is set to one, then the orientation vector is in the opposite direction (0).

plc_pnt -- The placement point for areas and holes must be either Center or Face (Center).
rotation_angle -- This argument is not supported in FrameWorks Plus and is ignored.
rounding_scr -- This argument is not supported in FrameWorks Plus and is ignored.
rounding_log -- This sets the rounding of float variables when using the Write (see Write (on
page 118)) and Scan (see Scan (on page 110)) commands.
save_end -- This argument is not supported in FrameWorks Plus and is ignored.
status -- This argument is not supported in FrameWorks Plus and is ignored.
sweep -- This argument is not supported in FrameWorks Plus and is ignored.
thickness -- The area or hole thickness must be greater than or equal to zero (0, active).
weight -- Standard MicroStation command to set the active line thickness for primitive graphics.
The value can be between 0 and 31 (0).
width -- Standard MicroStation command to set the active text width in master units (10).
xsec_orient_vec_beam -- The cross-section orientation vector for a beam (0,0,1).
xsec_orient_vec_brace -- The cross-section orientation vector for a brace (1,0,0).
xsec_orient_vec_column -- The cross-section orientation vector for a column (0,0,1).

Example Syntax

80

default
rounding_scr = 2,

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

material = "Steel",
grade = "A36",
delete_log = "yes";
default material = "Concrete";
default grade = "Fc_3";
default origin_d = 0, 0, 100;
default
class = 1,
card_pnt_beam = 15,
card_pnt_brace = 15,
card_pnt_column = 15,
cut_dist_beam = 1,
cut_dist_brace = 1,
cut_dist_column = 1,
cut_prior_beam = 8,
cut_prior_brace = 15,
cut_prior_column = 3,
grade = "A36",
material = "Steel",
mirror = 1,
n_copies = 2,
plc_pnt = "face",
thickness = 1,
xsec_orient_vec_beam = 0,0,1,
xsec_orient_vec_brace = 1,0,0,
xsec_orient_vec_column = 0,0,1,
origin_d = 0,0,0,
rounding_scr = 5,

Delete
Syntax
delete

Usage
This command is not supported in FrameWorks Plus.

Example Syntax

Do
Syntax
do variable_name = I, to = I [ , incr = I ] ;

Usage
This command allows the repeated execution of the statements following it until the program
reaches the Enddo statement (see Enddo (on page 85)).

FrameWorks Plus Programmer's Reference

81

Parametric Modeling Language


Limitations
There is a maximum of 10 nested Do loops. The variable name restrictions are the same as those
discussed in regards to the Assign statement (see Assign (on page 72)). The variable must be the
first parameter after the Do statement.

Arguments
incr -- The value by which the variable_name is incremented each time the Enddo statement is
executed. This value cannot be set to zero (0).
to -- This value has to be greater than or equal to the start value for the loop if incr is positive and
less than or equal to the start value if incr is negative.

Example Syntax
if test != 0;
do build = 1, to = 15;
.
.
.
enddo;
endif;
do i = 1, to = bay_x + 1;
assign y1 = 0;
assign y2 = y_spacing;
do j = 1, to = bay_y;
plc_beam end1 = x1, y1, z1, end2 = x1, y2, z1;
assign y1 = y2;
assign y2 = y2 + y_spacing;
enddo;
assign x1 = x1 + x_spacing;
enddo;

82

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Elseif
Syntax
Elseif I;

Usage
If the conditions of an If statement are not met, the subsequent lines (till an Else or an Endif) are
executed otherwise a search for an Else or an Endif is initiated. The expression is evaluated to
either true (1) or false (0).

Limitations
An If statement must have been executed. Also, all operators must be preceded and followed by a
blank space. Only relational operators can be used (no logical operators).

Example Syntax
See examples in If (If (on page 89)) or Endif (Endif (on page 86)).

Else
Syntax
else;

Usage
If the conditions of an If or an Elseif statement are not met, the subsequent lines (till an Endif) are
executed, otherwise a search for Endif is initiated.

Limitations
An If statement must have been executed.

Example Syntax
if x==y;
.
.
.
else;
.
.
endif;
For more examples, refer to Endif (on page 86).

FrameWorks Plus Programmer's Reference

83

Parametric Modeling Language

End Assembly
Syntax
end_assem [ assem_num = I ] ;

Usage
This command is used after a Start Assembly command (see Start Assembly (on page 113)) to
signal the termination of an assembly. Assemblies must be closed in the opposite order in which
they were opened. If an assembly number (assem_num) is not defined, the last opened assembly
is closed.
Assemblies are not used in FrameWorks Plus. This command is available only for
compatibility with ModelDraft PMLs.

Arguments
assem_num -- The assembly number must have been opened earlier in the program.

Example Syntax

84

start_assem assem_num = 1;
plc_column end1 = 0,0,0 ,end2 = 0,0,12;
end_assem;
assign ladder_assem = 100,
var_type = "int",
field_num = 24;
start_assem assem_num = ladder_assem;
start_assem assem_num = ladder_assem + 1;
plc_column end1 = clearx, -cleary, 0,
end2 = clearx, -cleary, height;
plc_column end1 = x + clearx, y - cleary, 0,
end2 = x + clearx, y - cleary, height;
end_assem assem_num = ladder_assem + 1;
start_assem assem_num = ladder_assem + 2;
plc_beam end1 = clearx, -cleary, firststep,
end2 = x + clearx, y - cleary, firststep;
copy_last_elem delta = 0,0,rungspace, n_copies = rungcopies;
end_assem assem_num = ladder_assem + 2;
end_assem;

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Enddo
Syntax
enddo;

Usage
This command signals the end of the last activated Do loop (see Do (on page 81)).

Limitations
A Do loop must be active.

Example Syntax

if test != 0;
do build = 1, to = 15;
.
.
.
enddo;
endif;
do i = 1, to = bay_x + 1;
assign y1 = 0;
assign y2 = y_spacing;
do j = 1, to = bay_y;
plc_beam end1 = x1, y1, z1, end2 = x1, y2, z1;
assign y1 = y2;
assign y2 = y2 + y_spacing;
enddo;
assign x1 = x1 + x_spacing;
enddo;

End Group
Syntax
end_group [ , group_num = I ] ;

Usage
This command is issued after a Start Group command (see Start Group (on page 113)) to signal
the termination of a group. Groups must be closed in the opposite order in which they were
opened. If a group number (group_num) is not defined, the last opened group is closed.

Arguments
group_num -- The group number must have been opened earlier in the program.

Example Syntax

start_group group_num = 1;
plc_column end1 = 0,0,0 ,end2 = 0,0,12;
end_group;

FrameWorks Plus Programmer's Reference

85

Parametric Modeling Language

start_group group_num = 1;
plc_column end1 = 0, 0, 0,
end2 = 0, 0, height;
start_group group_num = 2;
plc_column end1 = 5, 0, 0,
end2 = 5, 0, height;
end_group group _num = 1;
plc_beam end1 = 0, 0, height,
end2 = 5, 0, height;
end_group;

Endif
Syntax
endif;

Usage
This command signals the termination of an active If statement.

Limitations
An If statement must have been executed, see If (on page 89).

Example Syntax

if x_length 0;
exit;
endif;
if trans_num>= 3;
copy_group group_num = 3,
delta = 0,0,transz;
endif;
if hole_depth = 0;
exit;
else;
assign hole_depth = hole_depth / 12;
plc_hole
.
.
.
endif;
if hole_depth_in> slab_thick_in;

assign hole_depth_in = slab_thick_in;


assign hole_depth = hole_depth_in / 12; elseif hole_depth_in ==
slab_thick_in;
assign hole_depth = hole_depth_in / 12; < elseif
hole_depth_in slab_thick_in;
assign offsetz = hole_depth_in slab_thick_in;
.
.
.
endif;

86

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Endwhile
Syntax
endwhile;

Usage
The command signals the end of the last active While loop (see While (on page 117)).

Limitations
A While loop must be active.

Example Syntax

assign continue = 1,
var_type = "int";
while continue;
.
.
.
if x_length 0;
assign continue = 0;
endif;
endwhile;

Evaluate
Syntax
evaluate [ verify = S ] ;

Usage
This command is a debugging tool that, when set on, writes all pertinent data to the .log file.

Arguments
verify -- Yes or No. This acts as a toggle. Using Evaluate by itself is the same as using evaluate
verify = "no";

Example Syntax

pml 885
05:00:26
PML file: plc_beam.pml
file run by user: model
terminal type: vt100
SAVE ANGULAR UNITS = DEG
SAVE LINEAR UNITS = FT
evaluate verify = "yes";
units linear_input = "ft",
linear_output = "ft";

FrameWorks Plus Programmer's Reference

87

Parametric Modeling Language

88

UNITS
ANGULAR_INPUT = DEG
ANGULAR_OUTPUT = DEG
LINEAR_INPUT = FT
LINEAR_OUTPUT = FT
section table_name = "ETB_DIR?aisc.etb",
section_beam = "W14X68",
section_column = "W12X45";
SECTION
SECTION_ACTIVE =
SECTION_BEAM = W14X68
SECTION_COLUMN = W12X45
SECTION_BRACE =
TABLE_NAME = /usr/ip32/ist/dat/aisc
.
.
.
plc_area
vert1 = -slab_x, -slab_y, 0,
vert2 = -slab_x, (frame_spacing * frame_number)+ slab_y, 0,
vert3 = slab_x + span, (frame_spacing * frame_number) + slab_y, 0,
vert4 = slab_x + span, -slab_y, 0,
vert5 = -slab_x, -slab_y, 0,
thickness = slab_thick,
offset = slab_z;
PLC_AREA
OFFSET = 0.1667
THICKNESS = 1.5000
CLASS = 1
FLOODING = BUOYANT
NUMBER OF VERTICES = 5
PARENT NUMBER = 115
PARENT TYPE = ASSEMBLY
PLC_PNT = FACE
STATUS = 0
GRADE = Fc_3
MATERIAL = CONCRETE
NAME =
USER_ATTR =
VERT_1 = -1.0000, -1.0000, 0.0000
VERT_2 = -1.0000, 41.0000, 0.0000
VERT_3 = 21.0000, 41.0000, 0.0000
VERT_4 = 21.0000, -1.0000, 0.0000
VERT_5 = -1.0000, -1.0000, 0.0000
evaluate verify = "no";

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Exit
Syntax
exit;

Usage
This command signals the termination of the PML program. It can also be issued in a tutorial by
pressing the reset button.

Help
Syntax
help

Usage
FrameWorks Plus does not support this command.

Limitations

If
Syntax
if I;

Usage
If the conditions of an IF statement are met, the subsequent lines (till an Elseif, Else or an Endif)
are executed, otherwise a search for an Elseif, ELSE, or an ENDIF is initiated. The expression is
evaluated to either true (1) or false (0).

Limitations
This statement cannot be nested. All operators must be preceded and followed by a blank. Only
relational operators can be used (no logical operators).

Example Syntax

if x==y;
.
.
.
endif;
if x==y;
.
.
.
elseif x==z;
.
.

FrameWorks Plus Programmer's Reference

89

Parametric Modeling Language


.
endif;
Refer to Endif for more examples, see Endif (on page 86).

Inquire
Syntax
inquire [ , prompt ] [ , stroke_fact ];

Usage
FrameWorks Plus does not support this command.

Language
Syntax
language

Usage
This command is not supported by FrameWorks Plus.

Limitations

Mdr
Syntax
mdr cmd = S

Usage
FrameWorks Plus does not support this command.

Arguments
Example Syntax

90

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Message
Syntax
message prompt = S [ , alpha = S ] [ , var_name = I, R, S ] ;

Usage
FrameWorks Plus does not support this command.

Arguments
Example Syntax

Mstn
Syntax
mstn cmd = S

Usage
This command allows the user to access any MicroStation command from within a PML program.
This command can call FrameWorks Plus commands.

Arguments
cmd -- This argument is required and specifies that the string that follows will be a MicroStation
command.

Example Syntax

mstn
mstn
mstn
mstn
mstn

cmd
cmd
cmd
cmd
cmd

=
=
=
=
=

"co=3";
"wt=4";
"pla lin";
"xy=0,0,0";
"xy=10,10,0;

!
!
!
!
!

Change Color
Change Line Weight
Place Line
End 1 of line
End 2 of line

Open
Syntax
open file = S [ , open_mode = S ] ;

Usage
This command is used to open an ASCII file to be written to or read from. This command must
precede the Scan (see Scan (on page 110)) and Write (see Write (on page 118)) commands. After
reading and writing data, the Close command (see Close (on page 74)) is used to close the file.

Arguments
open_mode -- This argument must be accompanied by one of the following valid strings:
"open_wr" -- This string opens the file for it to be written to. Using this valid string creates the
specified file if it does not already exist.

FrameWorks Plus Programmer's Reference

91

Parametric Modeling Language


"open_rd" -- This string opens the file for it to be read. This valid string requires that the file exists
before reading it.

Example Syntax

assign filename = "c:\usr\input.dat", var_type = "char";


open file = filename, open_mode = "open_rd";
open file = "c:\usr\output.dat", open_mode = "open_wr";
! READ IN DATA FROM INPUT FILE
!
! Where the input file, swoc.in, looks like: X.Coordinate=10.5;
assign infile = "swoc.in", var_type = "char";
open file = infile, open_mode = "open_rd";
assign x = 1.0, var_type = "float";
assign xcoord_string = " ", var_type = "char";
scan file = infile, var1 = "xcoord_string", var2 = "x",
separator = "=", terminator = ";",
scan_mode = "scan_ascii";
close file = infile;
! WRITE TO OUTPUT FILE
!
! Where the output file, swoc.out, looks like: X.Coordinate=10.5000!
assign outfile = "swoc.out", var_type = "char"; open file = outfile,
open_mode = "open_wr"; write file = outfile, var1 = "xcoord_string", var2
= "x",
separator = "-", terminator = "!",
write_mode = "write_ascii"; close file = outfile;

Origin
Syntax
origin [ local = R, R, R ] [ , prompt = S ] ;

Usage
The two arguments for this command, local and prompt, cannot be used at the same time.
If the Origin command is used by itself on a line (followed by a semicolon), then the default system
message DB: Origin point; RST: Accept current 0,0,0 (message number 1862) is used. In either
case, it defines a point to be used as a local origin that is mapped to a point defined by the user in
the design file for placing elements.

Limitations
The use of the Origin command supersedes any previous Origin commands used in a PML
program.

Arguments
local -- This argument specifies the local origin point. The coordinates of any element keyed in
after this command is issued will have the local origin added to them.
prompt -- If this argument is used, the system message is overridden with your custom prompt for
origin placement. Pressing the reset button at placement time places the origin at 0,0,0.

92

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Real World Points
This command requires the use of a design file data point. The values are returned in the save
units. The captured point can be investigated in a PML script by referring to:
1. < point_x
2. < point_y
3. < point_z

Example Syntax

origin;
plc_column end1 = 0,0,0,
end2 = 0,0,12;
origin local = 0,0,100;
plc_column end1 = 0,0,0,
end2 = 0,0,12;
origin prompt="Define Origin Point";
< assign origin_x=point_x,
var_type="float"; < assign origin_y=point_y,
var_type="float"; < assign origin_z=point_z,
var_type="float";

Override
Syntax
override;

Usage
This command is used to bypass any error that occurs while running a PML program. Because
errors that occur after the Override command would not allow graphics to be placed in the file, the
Override command should be placed at the end of the script and/or before the Show Graphics
command (see Show Graphics (on page 112)). For example, if two Plc_Beam commands were in
the PML script and one of them had a syntax error, the correct command would place graphics
into the file if the Override command was used. In addition, the .log file would still indicate an error
for the incorrect command. Without the Override command, neither beam would be placed into the
file.

Example Syntax

override;
show_graphics tentative = "on";
exit prompt = "Finished PML";

FrameWorks Plus Programmer's Reference

93

Parametric Modeling Language

Place Arc
Syntax
plc_arc
norm = R,R,R, origin_a = R,R,R, start_pnt = R,R,R, sweep = R
[ , arc_member_type = S ] [ , class = I ] [ , card_pnt = I ]
[ , cut_dist1 = R ] [ , cut_dist2 = R ]
[ , cut_orient_vec1 = R, R, R ]
[ , cut_orient_vec2 = R, R, R ]
[ , cut_prior1 = I ] [ , cut_prior2 = I ]
[ , flooding = S ] [ , grade = S ] [ , material = S ]
[ , mirror = I ] [ , name = S ] [ , offset_x = R ]
[ , offset_y = R ] [ , section = S ]
[ , status = I ] [ , user_attr = S ]
[ , xsec_orient_vec = R, R, R ] ;

Usage
This command places an arc member.

Arguments
arc_member_type -- Defines the arc member type. This attribute must be set to either beam,
column, or brace.
class -- The class should be between 0 and 4, inclusive.
card_pnt -- The cardinal point should be between 1 and 15, inclusive.
cut_dist1 -- The cutback distance for first end must be greater than or equal to zero. You must
specify a value for cut_orient_vec1 if you specify a value for this argument.
cut_dist2 -- The cutback distance for second end must be greater than or equal to zero. You must
specify a value for cut_orient_vec2 if you specify a value for this argument.
cut_orient_vec1 -- The cutback orientation vector for the first end. This vector is normal to the
cross-section.
cut_orient_vec2 -- The cutback orientation vector for the second end. This vector is normal to the
cross-section.
cut_prior1 -- The cutback priority for first end should be between 0 and 15, inclusive.
cut_prior2 -- The cutback priority for second end should be between 0 and 15, inclusive.
flooding -- This attribute is not used by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 24.
material -- The material name has a maximum number of characters of 32 and can be either of
the following valid strings: Steel, Concrete, Aluminum, or Timber.
mirror -- The mirror value should be between 0 and 3 inclusive. 0 - No mirror, 1 - Y-axis, 2 - X-axis,
3 - Both axes. Mirror values apply to the local orientation of the cross-section.
name -- The name or mark has a maximum number of characters of 24.
norm -- The vector normal to the arc.
offset_x -- The cross-section offset in the X direction.
offset_y -- The cross-section offset in the Y direction.
origin_a -- The arc origin coordinates.

94

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


section -- The section name has a maximum length of 32 characters. Section names cannot
contain a double-quote ["] character. If you need a double-quote character in the section name,
use two single-quote ['] characters instead.
start_pnt -- The coordinates of the arc starting point.
status -- This attribute is not used by FrameWorks Plus and is ignored.
sweep -- The arc sweep angle must not equal zero. Positive is counterclockwise.
user_attr -- This attribute is not used by FrameWorks Plus and is ignored.
xsec_orient_vec -- The cross-section orientation vector.

Example Syntax
plc_arc
arc_member_type = beam
norm = 0, 0 , 1,
origin_a = 0, 0, 0,
start_pnt = 10,0,0,
sweep = 90.0,
section = "C10X15.3",
card_pnt = 7,
mirror = 0,
class = 3,
material = "Steel",
cut_dist1 = .25,
cut_dist2 = .25,
cut_orient_vec2 = 1,0,0,
cut_orient_vec1 = 0,1,0,
cut_prior1 = 3, cut_prior2 = 3,
grade = "A36";

Place Area
Syntax
plc_area vert# = R, R, R
[ , class = I ] [ , cut_prior_area = I ] [ , fab_type = I ]
[ , flooding = S ] [ , grade = S ] [ , material = S ]
[ , merge_id = I ] [ , name = S ] [ , offset = R ]
[ , ov_parall = I ] [ , plc_pnt = S ] [ , status = I ]
[ , thickness = R ] [ , user_attr = S ];

Usage
This command places an area element.
The vertices coordinates: x1, y1, z1, ... xi, yi, zi, ... xn, yn, zn
The syntax for vertices is as follows: vert1=x1,y1,z1, vert2=x2,y2,z2, vert3=x3,y3,z3,
vertn=xn,yn,zn
The number following the term vert is required. Also, note that the vertices are entered in
global coordinates.

FrameWorks Plus Programmer's Reference

95

Parametric Modeling Language


Arguments
class -- The class should be between 0 and 4, inclusive. 0 - Primary, 1 - Secondary, 2 - Tertiary,
3 - User1, 4 - User2.
cut_prior_area -- This argument is not supported by FrameWorks Plus and is ignored.
fab_type -- Specifies the type of solid to place. A value of 0 places a generic solid. A value of 1
places a slab.
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 24.
material -- The material name has a maximum number of characters of 32 and can be either of
the following valid strings: Steel, Concrete, Aluminum, or Timber.
merge_id -- This argument is not supported by FrameWorks Plus and is ignored.
name -- The name or mark has a maximum number of characters of 24.
offset -- The element offset (0).
ov_parall -- Specifies how the orientation vector for the area element is determined. The order in
which the vertices that form the area element were placed controls the direction of the orientation
vector according to the right-hand rule.
If this argument is set to zero, the orientation vector will follow the right-hand rule. If the argument
is set to one, the orientation vector will be in the opposite direction (0).

plc_pnt -- The placement point for area must be either of the following valid strings: Center or
Face.
status -- This argument is not supported by FrameWorks Plus and is ignored.
thickness -- The area thickness must be greater than or equal to zero.
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.

Example Syntax

96

plc_area vert1 = 0,0,0, vert2 = 0,2,0, vert3 = 2,2,0, vert4 = 2,0,0;


plc_area vert1 = -slab_x, -slab_y, 0, vert2 = -slab_x, (frame_spacing
* frame_number) + slab_y, 0, vert3 = slab_x + span,
(frame_spacing*frame_number)+slab_y, 0, vert4 = slab_x + span, -slab_y
, 0, thickness = slab_thick, offset = .5, plc_pnt = "face", class = 3,
grade = "Fc_3", material = "Concrete", name = "slab1";
plc_area vert1 = 0, 0, 0, vert2 = 10, 0, 0, vert3 = 10,10, 0, vert4 =
0, 0, 0, grade = "Fc_3", thickness = 1;

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Place Beam
Syntax
plc_beam end1 = R, R, R, end2 = R, R, R
[ , card_pnt = I ] [ , class = I ] [ , cut_dist1 = R ]
[ , cut_dist2 = R ] [ , cut_orient_vec1 = R, R, R ]
[ , cut_orient_vec2 = R, R, R ] [ , cut_prior1 = I ]
[ , cut_prior2 = I ] [ , fireproof_thk = R ]
[ , fireproof_type = I ] [ , flooding = S ] [ , grade = S ]
[ , material = S ] [ , merge_id = I ] [ , mirror = I ]
[ , name = S ] [ , offset_x = R ] [ , offset_y = R ]
[ , section = S ] [ , status = I ] [ , user_attr = S ]
[ , xsec_orient_vec = R, R, R ] ;

Usage
This command places a beam.

Arguments
class -- The class should be between 0 and 4, inclusive. 0 - Primary, 1 - Secondary, 2 - Tertiary, 3
- User1, 4 - User2.
card_pnt -- The cardinal point should be between 1 and 15, inclusive.
cut_dist1 -- The cutback distance for first end must be greater than or equal to zero. You must
specify a value for cut_orient_vec1 if you specify a value for this argument.
cut_dist2 -- The cutback distance for second end must be greater than or equal to zero. You must
specify a value for cut_orient_vec2 if you specify a value for this argument.
cut_orient_vec1 -- The cutback orientation vector for the first end. This vector is normal to the
cross-section.
cut_orient_vec2 -- The cutback orientation vector for the second end. This vector is normal to the
cross-section.
cut_prior1 -- The cutback priority for first end should be between 0 and 15, inclusive.
cut_prior2 -- The cutback priority for second end should be between 0 and 15, inclusive.
end1 -- The element start coordinates.
end2 -- The element end coordinates.
fireproof_thk -- This argument is not supported by FrameWorks Plus and is ignored.
fireproof_type -- This argument is not supported by FrameWorks Plus and is ignored.
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 24.
material -- The material name has a maximum number of characters of 32 and can be one of the
following valid strings: Steel, Concrete, Aluminum, or Timber.
merge_id -- This argument is not supported by FrameWorks Plus and is ignored.
mirror -- The mirror value should be between 0 and 3 inclusive. 0 - No mirror, 1 - Y-axis, 2 - X-axis,
3 - Both axes. Mirror values apply to the local orientation of the cross-section.
name -- The name or mark has a maximum number of characters of 24.
offset_x -- The cross-section offset in the X direction.
offset_y -- The cross-section offset in the Y direction.

FrameWorks Plus Programmer's Reference

97

Parametric Modeling Language


section -- The section name has a maximum length of 32 characters. Section names cannot
contain a double-quote ["] character. If you need a double-quote character in the section name,
use two single-quote ['] characters instead.
status -- This argument is not supported by FrameWorks Plus and is ignored.
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.
xsec_orient_vec -- The cross-section orientation vector.

Example Syntax

98

plc_beam end1 = 0,0,12,


end2 = 20,0,12;
plc_beam
end1 = .5 * span, 0, col_height,
end2 = .5 * span, 0, col_height + roof_height;
plc_beam
end1 = -srun - steprun, 0 , -srise,
end2 = 0, 0, 0,
section = "C10X15.3",
card_pnt = 7,
mirror = 0,
class = stair_class,
material = "Steel",
cut_dist1 = .0001,
cut_dist2 = .0001,
cut_orient_vec2 = 1,0,0,
cut_orient_vec1 = 0,0,1,
cut_prior1 = 3, cut_prior2 = 3,
grade = "A36";
assign bm_sec = "W12X45",
var_type = "char",
field_num = 36,
prompt = "keyin beam section size";
.
.
.
section section_beam = bm_sec;
plc_beam
end1 = x1, y1, z1,
end2 = x2, y2, z2;

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Place Brace
Syntax
plc_brace end1 = R, R, R, end2 = R, R, R
[ , card_pnt = I ] [ , class = I ] [ , cut_dist1 = R ]
[ , cut_dist2 = R ] [ , cut_orient_vec1 = R, R, R ]
[ , cut_orient_vec2 = R, R, R ] [ , cut_prior1 = I ]
[ , cut_prior2 = I ] [ , fireproof_thk = R ]
[ , fireproof_type = I ] [ , flooding = S ] [ , grade = S ]
[ , material = S ] [ , merge_id = I ] [ , mirror = I ]
[ , name = S ] [ , offset_x = R ] [ , offset_y = R ]
[ , section = S ] [ , status = I ] [ , user_attr = S ]
[ , xsec_orient_vec = R, R, R ] ;

Usage
This command places a brace. It is identical to Place Beam (see Place Beam (on page 97)).

Arguments
class -- The class should be between 0 and 4, inclusive.
card_pnt -- The cardinal point should be between 1 and 15, inclusive.
cut_dist1 -- The distance for first end, can be zero. You must specify a value for cut_orient_vec1
if you specify a value for this argument.
cut_dist2 -- The cutback distance for second end, can be zero. You must specify a value for
cut_orient_vec2 if you specify a value for this argument.
cut_orient_vec1 -- The cutback orientation vector for first end.
cut_orient_vec2 -- The cutback orientation vector for second end.
cut_prior1 -- The cutback priority for first end should be between 0 and 15, inclusive.
cut_prior2 -- The cutback priority for second end should be between 0 and 15, inclusive.
end1 -- The element start coordinates.
end2 -- The element end coordinates.
fireproof_thk -- This argument is not supported by FrameWorks Plus and is ignored.
fireproof_type -- This argument is not supported by FrameWorks Plus and is ignored.
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 24.
material -- The material name has a maximum number of characters of 32 and can be Steel,
Concrete, Aluminum, or Timber.
merge_id -- This argument is not supported by FrameWorks Plus and is ignored.
mirror -- The mirror value should be between 0 and 3 inclusive. 0 - No mirror, 1 - Y-axis, 2 - X-axis,
3 - Both axes. Mirror values apply to the local orientation of the cross-section.
name -- The name or mark has a maximum number of characters of 24.
offset_x -- The cross-section offset in the X direction.
offset_y -- The cross-section offset in the Y direction.
section -- The section name has a maximum length of 32 characters. Section names cannot
contain a double-quote ["] character. If you need a double-quote character in the section name,
use two single-quote ['] characters instead.

FrameWorks Plus Programmer's Reference

99

Parametric Modeling Language


status -- This argument is not supported by FrameWorks Plus and is ignored.
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.
xsec_orient_vec -- The cross-section orientation vector.

Example Syntax

plc_brace end1 = 0,0,0 ,end2 = 20,0,12;


plc_brace
end1 = end1_x, end1_y, end1_z,
end2 = end2_x, end2_y, end2_z;
plc_brace end1 = 0,0,0,
end2 = (long_length / 2), 0, x1,
section = brsection,
card_pnt = 10,
mirror = 0,
class = 2,
material = "Steel",
grade = "A36";

Place Column
Syntax
plc_column end1 = R, R, R, end2 = R, R, R
[ , card_pnt = I ] [ , class = I ] [ , cut_dist1 = R ]
[ , cut_dist2 = R ] [ , cut_orient_vec1 = R, R, R ]
[ , cut_orient_vec2 = R, R, R ] [ , cut_prior1 = I ]
[ , cut_prior2 = I ] [ , fireproof_thk = R ]
[ , fireproof_type = I ] [ , flooding = S ] [ , grade = S ]
[ , material = S ] [ , merge_id = I ] [ , mirror = I ]
[ , name = S ] [ , offset_x = R ] [ , offset_y = R ]
[ , section = S ] [ , status = I ] [ , user_attr = S ]
[ , xsec_orient_vec = R, R, R ] ;

Usage
This command places a column. It is identical to Place Beam (see Place Beam (on page 97)).

Arguments
class -- The class should be between 0 and 4, inclusive. 0 - Primary, 1 - Secondary, 2 - Tertiary, 3
- User1, 4 - User2.
card_pnt -- The cardinal point should be between 1 and 15, inclusive.
cut_dist1 -- The distance for first end can be zero. You must specify a value for cut_orient_vec1
if you specify a value for this argument.
cut_dist2 -- The cutback distance for second end can be zero. You must specify a value for
cut_orient_vec2 if you specify a value for this argument.
cut_orient_vec1 -- The cutback orientation vector for first end.
cut_orient_vec2 -- The cutback orientation vector for second end.
cut_prior1 -- The cutback priority for first end should be between 0 and 15, inclusive.
cut_prior2 -- The cutback priority for second end should be between 0 and 15, inclusive.

100

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


end1 -- The element start coordinates.
end2 -- The element end coordinates.
fireproof_thk -- This argument is not supported by FrameWorks Plus and is ignored.
fireproof_type -- This argument is not supported by FrameWorks Plus and is ignored.
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 24.
material -- The material name has a maximum number of characters of 32 and can be one of the
following valid strings: Steel, Concrete, Aluminum, or Timber.
merge_id -- This argument is not supported by FrameWorks Plus and is ignored.
mirror -- The mirror value should be between 0 and 3 inclusive. 0 - No mirror, 1 - Y-axis, 2 - X-axis,
3 - Both axes. Mirror values apply to the local orientation of the cross-section.
name -- The name or mark has a maximum number of characters of 24.
offset_x -- The cross-section offset in the X direction.
offset_y -- The cross-section offset in the Y direction.
section -- The section name has a maximum length of 32 characters. Section names cannot
contain a double-quote ["] character. If you need a double-quote character in the section name,
use two single-quote ['] characters instead.
status -- This argument is not supported by FrameWorks Plus and is ignored.
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.
xsec_orient_vec -- The cross-section orientation vector.

Example Syntax

plc_column end1 = 0,0,0 ,end2 = 0,0,12;


plc_column
end1 = span,0,0,
end2 = span,0,col_height;
plc_column end1 = 0, y1, z1,
end2 = 0, y1, z2,
name = "COL1";
plc_column
end1 = overall + offset, 0, extent,
end2 = overall + offset, 0, extent + height,
section = "W12X45",
class = 0,
card_pnt = cpsection,
mirror = 0,
cut_prior1 = 4, cut_prior2 = 4,
xsec_orient_vex = 0, 1, 0;
plc_column
end1 = width + clearx, -cleary, 0,
end2 = width + clearx, -cleary, height,
card_pnt = cprail,
mirror = mirrorrail,
class = ladderclass,
xsec_orient_vec = 0, 1, 0,
name = "ladder1";

FrameWorks Plus Programmer's Reference

101

Parametric Modeling Language

Place Hole
Syntax
plc_hole vert# = R, R, R
[ , flooding = S ] [ , name = S ] [ , offset = R ]
[ , plc_pnt = S ] [ , thickness = R ] [ , user_attr = S ] ;

Usage
This command places a hole element in the area element that was placed last.

Arguments
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
name -- The name or mark has a maximum number of characters of 24.
offset -- This argument is not supported by FrameWorks Plus and is ignored.
plc_pnt -- The placement point for hole must be either of the following valid strings: Center or
Face.
thickness -- The hole thickness must be greater than zero.
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.
vert# -- The vertices coordinates: x1, y1, z1, ... xi, yi, zi, ... xn, yn, zn

Example Syntax

plc_hole vert1=.5,.5,0 ,vert2=.5,1.5,0 ,vert3=1.5,1.5,0


,vert4=1.5,0,0;
plc_hole
vert1 = .5, .5, 0,
vert2 = .5, 1.5, 0,
vert3 = 1.5, 1.5, 0,
vert4 = 1.5, 0, 0,
thickness = 1.5,
plc_pnt = "face",
name = "hole1";

Place Linestring
Syntax
plc_linestr vert# = R, R, R [ , color = I ] [ , level = I ] [ , linecode
= I ] [ , weight = I ];

Usage
This command places a MicroStation line string using the specified color, level, line style, and line
weight.

Limitations
The maximum number of vertices in a linestring is 97.

102

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Arguments
color -- Standard MicroStation command to set the color for primitive graphics. The value can be
between 0 and 255 (0).
level -- Standard MicroStation command to set the level. The value can be between 1 and 63 (1).
linecode -- Standard MicroStation command to set the line style for primitive graphics. The value
can be between 0 and 7 (0).
vert# -- The vertices coordinates, up to a maximum of 97 per element: x1, y1, z1, ... xi, yi, zi, ... xn,
yn, zn, ...
weight -- Standard MicroStation command to set the line thickness for primitive graphics. The
value can be between 0 and 31 (0).

Example Syntax

plc_linestr
vert1 = 20.5, 22, 16.5, vert2 = 40.5, 22, 16.5, vert3 = ...
color = 1, level = 2, linecode = 3, weight = 4;

Place Line
Syntax
plc_line end1 = R, R, R, end2 = R, R, R [ , color = I ] [ , end1 = I ]
[ , end2 = I ] [ , level = I ] [ , linecode = I ] [ , weight = I ];

Usage
This command is used to place a MicroStation line using the specified color, level, line style, and
line weight.

Arguments
color -- Standard MicroStation command to set the color for primitive graphics. The value can be
between 0 and 255 (0).
level -- Standard MicroStation command to set the level. The value can be between 1 and 63 (1).
linecode -- Standard MicroStation command to set the line style for primitive graphics. The value
can be between 0 and 7 (0).
weight -- Standard MicroStation command to set the line thickness for primitive graphics. The
value can be between 0 and 31 (0).

Example Syntax

plc_line
end1 = 20.5, 22, 16.5, end2 = 40.5, 22, 16.5,
color = 1, level = 2, linecode = 3, weight = 4;

Place Primitive Arc


Syntax
plc_prim_arc norm = R, R, R, origin_a = R, R, R, start_pnt = R, R, R, sweep
= R
[ , color = I ] [ , level = I ] [ , linecode = I ] [ , weight = I ];

FrameWorks Plus Programmer's Reference

103

Parametric Modeling Language


Usage
This command places a MicroStation arc using the specified color, level, line style, and line
weight.

Arguments
color -- Standard MicroStation command to set the color for primitive graphics. The value can be
between 0 and 255 (0).
level -- Standard MicroStation command to set the level. The value can be between 1 and 63 (1).
linecode -- Standard MicroStation command to set the line style for primitive graphics. The value
can be between 0 and 7 (0).
norm -- The vector normal to the arc.
origin_a -- The arc origin coordinates.
start_pnt -- The coordinates of the arc starting point.
sweep -- The arc sweep angle must not equal zero. Positive is counterclockwise.
weight -- Standard MicroStation command to set the line thickness for primitive graphics. The
value can be between 0 and 31 (0).

Example Syntax

plc_arc
norm = 0, 0, 1, origin_a = 12.25, 0, 0,
start_pnt = 25, 0, 0, sweep = 35.5,
color = 1, level = 2, linecode = 3, weight = 4;

Place Shape
Syntax
plc_shape vert# = R, R, R, [ , color = I ] [ , level = I ] [ , linecode =
I ] [ , weight = I ];

Usage
This command places a MicroStation shape using the specified color, level, line style, and line
weight.

Limitations
The number of vertices that form a shape must be greater than or equal to 3 and less than or equal
to 97.

Arguments
color -- Standard MicroStation command to set the color for primitive graphics. The value can be
between 0 and 255 (0).
level -- Standard MicroStation command to set the level. The value can be between 1 and 63 (1).
linecode -- Standard MicroStation command to set the line style for primitive graphics. The value
can be between 0 and 7 (0).
weight -- Standard MicroStation command to set the line thickness for primitive graphics. The
value can be between 0 and 31 (0).

104

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


vert# -- The vertices coordinates, with a minimum of 3 and a maximum of 97 per element: x1, y1,
z1, ... xi, yi, zi, ... xn, yn, zn, ...

Example Syntax

plc_shape
vert1 = 20.5, 22, 16.5, vert2 = 40.5, 22, 16.5, vert3 = . . .,
color = 1, level = 2, linecode = 3, weight = 4;

Place Text
Syntax
plc_text string = S, norm = R, R, R, location = R, R, R, plc_vec = R, R,
R,
[ , color = I ] [ , font = I ] [ , height = I ]
[ , just = I ] [ , level = I ] [ , width ];

Usage
This command places MicroStation text using the specified color, level, font, justification point, text
height and width.

Arguments
color -- Standard MicroStation command to set the color for primitive graphics. The value can be
between 0 and 255 (0).
font -- Standard MicroStation command to set the font. (0).
just -- Standard MicroStation command to set the text justification. The value can be 0, 1, 2, 6, 7,
8, 12, 13, or 14 (0).

height -- Standard MicroStation command to set the text height in master units (10).
level -- Standard MicroStation command to set the level. The value can be between 1 and 63 (1).
location -- Coordinates for the justification point.
norm -- Defines the direction normal to the text, which is perpendicular to the plane on which the
text is to be placed.
plc_vec -- Direction of the orientation vector for the text string. The text is oriented from left to right
as it would be read.

FrameWorks Plus Programmer's Reference

105

Parametric Modeling Language


string -- The text string to be placed.
weight -- Standard MicroStation command to set the line thickness for primitive graphics. The
value can be between 0 and 31 (0).
width -- Standard MicroStation command to set the text width in master units (10).

Example Syntax

plc_text
string = "Testing PML Text",
norm = 0, 0, 1, plc_vec = 1, 0, 0, location = 1, 10.2, 0,
color = 1, level = 2, weight = 4,
font = 50, just = 8, height = 6, width = 5;

Place Volume
Syntax
plc_volume vert# = R, R, R
[ , class = I ] [ , cut_prior_vol = I ] [ , fab_type ]
[ , flooding = S ] [ , grade = S ] [ , material = S ]
[ , merge_id = I ] [ , name = S ] [ , status = I ]
[ , user_attr = S ] ;

Usage
This command places a volume element.

Arguments
class -- The class should be between 0 and 4, inclusive. 0 - Primary, 1 - Secondary, 2 - Tertiary, 3
- User1, 4 - User2.
cut_prior_vol -- This argument is not supported by FrameWorks Plus and is ignored.
fab_type -- This argument is not supported by FrameWorks Plus and is ignored.
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 8.
material -- The material name has a maximum number of characters of 32 and can be one of the
following strings: Steel, Concrete, Aluminum, or Timber.
merge_id -- This argument is not supported by FrameWorks Plus and is ignored.
name -- The name or mark has a maximum number of characters of 24.
status -- This argument is not supported by FrameWorks Plus and is ignored.
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.
vert# -- The vertices coordinates: x1, y1, z1, ... xi, yi, zi, ... xn, yn, zn

Example Syntax

106

plc_volume
vert1 = 0,0,0 ,vert2 = 0,2,0 ,vert3 = 2,2,0 ,vert4 = 2,0,0
vert5 = 0,0,-2 ,vert6 = 0,2,-2 ,vert7 = 2,2,-2 ,vert8 = 2,0,-2;
plc_volume
vert1 = x1,y1,z1,
vert2 = x1,y2,z1,
vert3 = x2,y2,z1,

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

vert4 = x1,y2,z1,
vert5 = x1,y1,z2,
vert6 = x1,y2,z2,
vert7 = x2,y2,z2,
vert8 = x1,y2,z2,
class = 0,
grade = "Fc_3",
material = "Concrete";
plc_volume
vert1 = 0, 0, 0,
vert2 = 10, 0, 0,
vert3 = 10,10, 0,
vert4 = 0, 0, 0,
vert5 = 0, 0, 5,
vert6 = 10, 0, 5,
vert7 = 10,10, 5,
vert8 = 0, 0, 5,
grade = "Fc_3";

Read
Syntax
read [ file = S ] [ , prompt = S ] ;

Usage
FrameWorks Plus does not support this command.

Limitations
Arguments
Example Syntax

FrameWorks Plus Programmer's Reference

107

Parametric Modeling Language

Run
Syntax
run image = S [ , prompt = S ] [ , passed_arg = S ];

Usage
This command is used to call or run an executable image (a linked and compiled program) or a
shell script from within a PML. This command is beneficial if extensive computations or speed are
required.
The name of the shell script must end with a .exe extension.
To retrieve data from the executable, the executable would have to write its results or output to an
output file. Then the Scan command (see Scan (on page 110)) would be used to read the data
stored in this file into the PML variables.

Limitations
This command can only be used on the workstation.

Arguments
image -- The name of the linked and compiled executable program.
prompt -- The prompt that is displayed while the executable is running.
passed_arg -- A string that is passed into the executable program. Only one can be used in a
script.

Example Syntax

108

! This PML is used to test the RUN command.


! The output file (plate.out) is created from the
! executable plate.exe, and would look like the
! following:
!
!
plate_name = PL1
!
plate_b = 10
!
plate_d = 6
!
bolt_dia = 0.5
!
!
! Initialize variables to store data from output file.
! Output file created using the RUN command.
!
assign plate_name = "PL1", var_type = "char";
assign plate_string = " ", var_type = "char";
assign b_dim_string = "", var_type = "char";
assign b_dim = 0, var_type = "float";
!initial to 0 assign d_dim_string = "", var_type = "char";
assign d_dim = 0, var_type = "float";
!initial to 0 assign bolt_string = "", var_type = "char";
assign bolt_dia = 0, var_type = "float";
!initial to 0 ! RUN the executable image (C program)
run image = "plate.exe",
prompt = "Running PLATE.EXE, please wait",

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


passed_arg = plate_name;
! Open and read in the results from the executable
var_type = "char";
open file = outfile, open_mode = "open_rd";
scan file = outfile,
var1 = "plate_string", var2 = "plate_name",
separator = "=", scan_mode = "scan_ascii";
scan file = outfile,
var1 = "b_dim_string", var2 = "b_dim",
separator = "=", scan_mode = "scan_ascii";
scan file = outfile,
var1 = "d_dim_string", var2 = "d_dim",
separator = "=", scan_mode = "scan_ascii";
scan file = outfile,
var1 = "bolt_string", var2 = "bolt_dia",
separator = "=", scan_mode = "scan_ascii";
close file = outfile; ! Write the results to another file, plate.new
assign newfile = "/usr/pml/plate.new",
var_type = "char";
open file = newfile, open_mode = "open_wr";
write file = newfile,
var1 = "plate_string", var2 = "plate_name",
separator = "=", write_mode = "write_ascii";
write file = newfile,
var1 = "b_dim_string", var2 = "b_dim",
separator = "=", write_mode = "write_ascii";
write file = newfile,
var1 = "d_dim_string", var2 = "d_dim",
separator = "=", write_mode = "write_ascii";
write file = newfile,
var1 = "bolt_string", var2 = "bolt_dia",
separator = "=", write_mode = "write_ascii";
close file = newfile; exit prompt = "PML Finished";

Save
Syntax
save [ file = S ] [ , prompt = S ] ;

Usage
FrameWorks Plus does not support this command.

FrameWorks Plus Programmer's Reference

109

Parametric Modeling Language


Limitations
Arguments
Example Syntax

Scan
Syntax
scan file = S, var1 = S, . . . varn = S [ , scan_mode = S ]
[ , separator = S ] [ , terminator = S ] ;

Usage
This command is used to read variables from an ASCII file and should be preceded by the Open
command (see Open (on page 91)), which opens the specified file. The Close command (see
Close (on page 74)) should then follow to close the file after it has been read.

Arguments
scan_mode -- Sets the mode for reading variables in either an ASCII or binary file. One of the
following valid strings must accompany this argument:
scan_ascii -- This string sets the mode to ASCII.
scan_bin -- FrameWorks Plus does not support this string.
separator -- Defines what special character was used to separate the variables in the file.
terminator -- Defines what special character was used as ending punctuation for lines in the file.
var1 . . . varn -- Variables, whether integer, float, or string have to be assigned for the Write
command (see Write (on page 118)). The variable type governs the type of data the variable can
store.

Example Syntax

110

! READ IN DATA FROM INPUT FILE


!
! Where the input file, swoc.in, looks like: X.Coordinate=10.5;
assign infile = "swoc.in", var_type = "char";
open file = infile, open_mode = "open_rd";
assign x = 1.0, var_type = "float";
assign xcoord_string = " ", var_type = "char";
scan file = infile, var1 = "xcoord_string", var2 = "x",
separator = "=", terminator = ";",
scan_mode = "scan_ascii";
close file = infile;
! WRITE TO OUTPUT FILE
!
! Where the output file, swoc.out, looks like: X.Coordinate=10.5000!
assign outfile = "swoc.out", var_type = "char";
open file = outfile, open_mode = "open_wr";
write file = outfile, var1 = "xcoord_string", var2 = "x",
separator = "-", terminator = "!",
write_mode = "write_ascii";
close file = outfile;

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Section
Syntax
section [ section_active = S ] [ , section_beam = S ] [ , section_brace =
S ] [ , section_column = S ] [ , table_name = S ] ;

Usage
This command is typically issued before the Place statements in the PML program and is used to
set the default section values.

Arguments
section_beam -- The section name for a beam (active; if not specified it will default to the active
parameter setting in FrameWorks Plus).
section_brace -- The section name for a brace (active; if not specified it will default to the active
parameter setting in FrameWorks Plus).
section_column -- The section name for a column (active; if not specified it will default to the
active parameter setting in FrameWorks Plus).
section_active -- Used to allow access to section geometric dimensions. Every time a Place
Beam or Place Arc statement is successfully issued (or a Read ) that has a defined section (even
if by default), this value is altered.
table_name -- This argument is not supported by FrameWorks Plus and is ignored.

Section Parameters
This command is also useful to access section geometry. The values are returned in table units,
which refers to the units used in IST. Be sure to proceed these built-in variables with a %% in the
code.
section_d -- Section depth.
section_b -- Section width.
section_tw -- Section web thickness.
section_tf -- Section flange thickness.
section_x -- Section X centroid location.
section_y -- Section Y centroid location.
section_ex -- Section X shear center location.
section_ey -- Section Y shear center location.

Example Syntax

section table_name = "ETB_DIR?aisc.etb";


section section_column = "W12X45",
section_beam = "W14X68",
section_brace = "WT6X15";
assign bm_section = "W14X68", var_type = "char", field_num = 24,
prompt = "keyin beam section size";
.
.
.
section section_active = bm_section;

FrameWorks Plus Programmer's Reference

111

Parametric Modeling Language


assign beam_d = %%section_d, var_type = "float";
!section depth
assign beam_bf = %%section_bf, var_type = "float";
!width
assign beam_tw = %%section_tw, var_type = "float";
!web thickness
assign beam_tf = %%section_tf, var_type = "float";
!flange thick
assign beam_x = %%section_x, var_type = "float";
!X centroid
assign beam_y = %%section_y, var_type = "float";
!Y centroid
assign beam_ex = %%section_ex, var_type = "float";
!X shearcenter
assign beam_ey = %%section_ey, var_type = "float";
!Y shearcenter
.
.
.
assign offset = beam_d / 2, var_type = "float";

Show Graphics
Syntax
show_graphics [ tentative = S ] ;

Usage
This command displays all elements that have not already been displayed on the screen. If this
command is not issued, all elements are displayed after successfully running a PML program.

Arguments
tentative -- Valid strings are On or Off (Off).
If set on, the graphics created by the PML are temporary displayed in the model. A dialog box then
displays prompting "Do you want to place these graphics into the model?" If the user clicks OK,
the graphics are permanently placed in the model. If the user clicks Cancel, the graphics are not
written to the model.
Holes that notch or nibble the edge of a solid members do not display correctly in tentative
mode. In tentative mode, the hole not only notches the solid member, but also displays outside the
solid element as a hole in space. When the user accepts the graphic with OK, the holes display
correctly once permanently written to the model.

Example Syntax

112

plc_beam end1 = .5 * span, 0, col_height, end2 = .5 * span, 0,


col_height + roof_height; show_graphics tentative = "on";

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

Start Assembly
Syntax
start_assem assem_num = I;

Usage
This command signals the beginning of an assembly.

Limitations
Assemblies are not used in FrameWorks Plus. This command is available only for
compatibility with ModelDraft PMLs.
You can have up to three assemblies open at one time. You can have up to six open groups at any
one time, provided there are no open assemblies (there is a one-to-one trade-off between groups
and assemblies).
You can have combined total of six open groups and assemblies, but the maximum number of
open assemblies is still three. Within one PML program, you can use a maximum of 50 assemblies
and/or groups.

Arguments
assem_num -- This number must be unique and greater than zero.

Example Syntax
For examples, see End Assembly (on page 84).

Start Group
Syntax
start_group group_num = I;

Usage
This command signals the beginning of a group.

Limitations
You can have up to three groups open at one time.
You can have up to six open groups at any one time, provided there are no open assemblies
(there is a one-to-one trade-off between groups and assemblies).
You can have a combined total of six open groups and assemblies, but the maximum number of
open assemblies is still three.
Within one PML program, you can use a maximum of 50 assemblies and/or groups.

Arguments
group_num -- This number must be unique and greater than zero.

FrameWorks Plus Programmer's Reference

113

Parametric Modeling Language

Translate
Syntax
translate file_pml_in = S, file_pml_out = S ; [ file_lang = S ] [ , prompt
= S ] ;

Usage
FrameWorks Plus does not support this command.

Limitations
Arguments
Example Syntax

Tutorial
Syntax
tutor tutorial_name = S [ , cell_library_name = S ] [ , prompt = S ] ;

Usage
This command activates a tutorial in which all variables with field numbers can be manipulated.
For information on creating tutorials, see Create the Tutorial Graphics (see "Creating the Tutorial
Graphics" on page 121).

Arguments
tutorial_name -- The tutorial name has a maximum number of characters of 6. The tutorial name
is the name of the cell file.
cell_library_name -- The cell library name has a maximum number of characters of 64.
prompt -- The prompt has a maximum number of characters of 64.

Units
Syntax
units [ , angular_input = S ] [ , angular_output = S ] [ , linear_input =
S ] [ , linear_output = S ] ;

Usage
This command affects only the Place statements. The save units mentioned in the following
argument descriptions refer to the default units set in the pml_wkup.md file. If the linear input units
are set to inches, then the lengths specified for all element types are input as inches instead of
feet.

Arguments
angular_input -- The input angular units given in RADians or DEGree (save units).
angular_output -- The output angular units given in RADians or DEGrees (save units).

114

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


linear_input -- The input linear units given in FT, IN, M, CM or MM (save units).
linear_output -- The output linear units given in FT, IN, M, CM or MM. This should be set to output
to the same units as the FrameWorks Plus file in which the elements are placed. (save units)

Example Syntax

units
units
units
units

linear_input = "FT";
linear_input = "M";
linear_input = "FT", linear_output = "FT", angular_input = "deg";
linear_input = "IN", linear_output = "FT";

Update
Syntax
update [ , assem_num = I, I, I ] [ , card_pnt = I ]
[ , class = I ] [ , cut_dist1 = R ] [ , cut_dist2 = R ]
[ , cut_orient_vec1 = R, R, R ] [ , cut_orient_vec2 = R, R, R ]
[ , cut_prior1 = I ] [ , cut_prior2 = I ]
[ , cut_prior_area = I ] [ , cut_prior_vol = I ]
[ , end1 = R, R, R ] [ , end2 = R, R, R ] [ , fab_type = I ]
[ , fireproof_thk = R ] [ , fireproof_type = I ]
[ , flooding = S ] [ , grade = S ] [ , material = S ]
[ , merge_id = I ] [ , name = S ] [ , offset = R ]
[ , offset_x = R ] [ , offset_y = R ]
[ , origin_d = R, R, R ] [ , ov_parall = I ]
[ , plc_pnt =S ] [ , section = S ] [ , status = I ]
[ , sweep = R ] [ , thickness = R ] [ , user_attr = S ]
[ , xsec_orient_vec = R, R, R ];

Usage
This command is used to modify both graphic and nongraphic data for existing elements, which
are selected interactively. Once selected, the data associated with the element can be modified
using the appropriate arguments. This command uses the same routines as the Inquire command
(see Inquire (on page 90)); therefore, the information that is available after using the Inquire
command is also available after the Update command.

Arguments
assem_num -- A valid assembly number (1 through 255) that has already been created in the
PML program and has elements successfully placed in it.
card_pnt -- The cardinal point should be between 1 and 15, inclusive.
class -- The class should be between 0 and 4, inclusive (0, active). 0 - Primary, 1 - Secondary, 2
- Tertiary, 3 - User1, 4 - User2.
cut_dist1 -- The cutback distance for the first end should be greater than zero.
cut_dist2 -- The cutback distance for the second end should be greater than zero.
cut_orient_vec1 -- The cutback orientation vector for the first end.
cut_orient_vec2 -- The cutback orientation vector for the second end.
cut_prior1 -- The cutback priority for first end should be between 0 and 15, inclusive.
cut_prior2 -- The cutback priority for second end should be between 0 and 15, inclusive.
cut_prior_area -- This argument is not supported by FrameWorks Plus and is ignored.

FrameWorks Plus Programmer's Reference

115

Parametric Modeling Language


cut_prior_vol -- This argument is not supported by FrameWorks Plus and is ignored.
end1 -- Starting point for arcs and linear members. (arcs, beams, braces, and columns)
end2 -- Ending point for arcs and linear members. (arcs, beams, braces, and columns)
fab_type -- This argument is not supported by FrameWorks Plus and is ignored.
fireproof_thk -- This argument is not supported by FrameWorks Plus and is ignored.
fireproof_type -- This argument is not supported by FrameWorks Plus and is ignored.
flooding -- This argument is not supported by FrameWorks Plus and is ignored.
grade -- The material grade has a maximum number of characters of 8.
material -- The material name has a maximum number of characters of 32 and can be one of the
following strings: Steel, Concrete, Aluminum, or Timber.
merge_id -- This argument is not supported by FrameWorks Plus and is ignored.
name -- The name or mark has a maximum number of characters of 24.
offset -- Offset of an area element. (areas only)
offset_x -- Offset of a cross-section - x component.
offset_y -- Offset of a cross-section - y component.
origin_d -- Local origin for the design file.
ov_parall -- Specifies how the orientation vector for the area element is determined. The order in
which the vertices that form the area element are placed controls the direction of the orientation
vector according to the right-hand rule.
If this argument is set to zero, then the orientation vector follows the right-hand rule. If the
argument is set to one, then the orientation vector is in the opposite direction (0).

plc_pnt -- The placement point for areas and holes must be either Center or Face (Center).
section -- The section name has a maximum number of characters of 32.
status -- This argument is not supported by FrameWorks Plus and is ignored.
sweep -- The arc sweep angle, which must not equal zero (180).
thickness -- The area or hole thickness must be greater than or equal to zero (0, active).
user_attr -- This argument is not supported by FrameWorks Plus and is ignored.
xsec_orient_vec -- The cross-section orientation vector.

Example Syntax

116

update
class = 4;
assign x =

class, var_type = "int";

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

update
class = 2,
grade = "Fc_4",
thickness = 1.5;

Wakeup
Syntax
wakeup

Usage
FrameWorks Plus does not support this command.

Limitations
Example Syntax

While
Syntax
while I;

Usage
This command allows the repeated execution of the statements following it until it encounters an
Endwhile (see Endwhile (on page 87)). The expression is evaluated to either true (1) or false (0).

Limitations
WHILE loops can be nested up to 10 deep.

Example Syntax

assign continue = 1,
var_type = "int";
while continue;
.
.
.
if x_length 0;
assign continue = 0;
endif;
endwhile;

FrameWorks Plus Programmer's Reference

117

Parametric Modeling Language

Write
Syntax
write file = S, var1 = S, . . . varn = S
[ , separator = S ] [ , terminator = S ] [ , write_mode = S ] ;

Usage
This command is used to write variables to an ASCII file. This command should be preceded by
the Open command (see Open (on page 91)), which opens the specified file. The Close command
(see Close (on page 74)) should follow the Write command to close the file.

Arguments

file -- Specifies the name of the file you want to write to.
separator -- Determines what special character is used to separate the variables written to the
file.
terminator -- Determines what special character will be used as ending punctuation for lines
written to the file.
var1 . . . varn -- Variables, whether integer, float, or string must be assigned for the Write
command. The variable type governs the type of data the variable can store.
write_mode -- Sets the mode for writing to the file in either ASCII or binary. One of the
following valid strings must accompany this argument:
write_ascii -- This string sets the mode to ASCII. write_bin -- This string sets the mode to
binary.

Example Syntax

118

assign filename = "/usr/model/output.dat", var_type = "char";


open file = filename, open_mode = "open_wr";
assign x = 0, var_type = "float";
assign y = 0, var_type = "int";
write file = filename, var1 = "x", var2 = "y",
separator = ",",
terminator = ";",
write_mode = "write_ascii";
close file = filename;
! READ IN DATA FROM INPUT FILE
!
! Where the input file, swoc.in, looks like: X.Coordinate=10.5;
assign infile = "swoc.in", var_type = "char";
open file = infile, open_mode = "open_rd";
assign x = 1.0, var_type = "float";
assign xcoord_string = " ", var_type = "char";
scan file = infile, var1 = "xcoord_string", var2 = "x",
separator = "=", terminator = ";",
scan_mode = "scan_ascii";
close file = infile;
! WRITE TO OUTPUT FILE
!
! Where the output file, swoc.out, looks like: X.Coordinate=10.5000!
assign outfile = "swoc.out", var_type = "char";

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


open file = outfile, open_mode = "open_wr";
write file = outfile, var1 = "xcoord_string", var2 = "x",
separator = "-", terminator = "!",
write_mode = "write_ascii";
close file = outfile;

PML Tutorials
Tutorials provide an excellent interface for PML programs. Using a few MicroStation tools, you can
quickly and easily develop your own customized tutorials to use with PML programs. The tutorial is
an integral part of any PML program providing the flexibility of having different fields to enter data
into and the ability to present the parameters in a graphic format. This section describes the
development of a tutorial for one of the example PML programs delivered with FrameWorks Plus.
The prompt for a PML tutorial field does not display until after you have entered a value in
that field. To work around this, select a field, and then press ENTER. Read the prompt. Then key
in an appropriate value, and press enter again.

Figure 2: Orthogonal Buildings PML Tutorial

FrameWorks Plus Programmer's Reference

119

Parametric Modeling Language

Tutorial Cell Format


A tutorial cell consists of:
Tutorial Text Node, which is a text node on MicroStation level 63 that flags the cell as a
tutorial cell and identifies the servicing software for the tutorial.
Control Information, which consists of text data on MicroStation level 63 that describes how
the tutorial inputs and outputs are to be handled.
Display Information, which consists of graphic data on MicroStation levels 1-62 that is to be
displayed when the tutorial is activated.

Tutorial Text Node


Each tutorial cell contains a text node on MicroStation level 63 to identify it as a tutorial and to
identify the servicing software for the tutorial. The text node contains two text strings that help to
identify the tutorial and distinguish it from other cells.
The first text string identifies the tutorial's servicing software. For PML tutorials, MicroStation is
designated to service the tutorial by the particular text string FB, which identifies the MicroStation
File Builder (FB) utility as the software for servicing the tutorial.
The second text string in the text node identifies the cell as a tutorial cell to distinguish it from
menu and other cells. This text string consists of the character T.

Tutorial Control Information


Control information is graphics data that, while not displayed, describes how tutorial inputs and
outputs are to be handled. This data consists of specially formatted text elements on MicroStation
level 63.

Figure 3: PML Tutorial With Input Field Numbers Displayed


Key Entry Field - Designed to accept keyboard input or data from the PML file.
Output Fields - FrameWorks Plus does not support this feature.

120

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


Application Fields - FrameWorks Plus does not support this feature. Use input fields instead.

Tutorial Display Information


Tutorial display information refers to the graphics that are displayed when a tutorial is activated.
These graphics are created on any of the MicroStation levels 1-62.
The tutorial display information should generally be as user friendly as possible, providing text and
graphics to explain how the tutorial is to be used.
Tutorial display information also refers to labels for input and output areas on the tutorial. For
example, text could be used to label output fields, such as SECTION SIZE:__________. Text
might also be used as column headings for output fields, such as:
ITEM DESCRIPTION

Creating the Tutorial Graphics


When a tutorial cell is created, you must observe certain conventions to conform to MicroStation
and terminal hardware requirements.
The tutorial should be created in a 2-D design file and stored in a 2-D cell library.
To conform to the aspect ratio and resolution of the screen, the tutorial cell must be digitized in
an area that is exactly 640 Units of Resolution (UORs) wide and 496 UORs high.
Display information (data displayed when the tutorial is activated) can be created on any of the
MicroStation levels 1-62. Display information can consist of any MicroStation element.
However, when a tutorial cell is added to a cell library, any nested cells are automatically
converted into orphan cells to speed up tutorial display.
In some applications, you may want to include text in a tutorial that conforms in size with the
hardware-generated characters output by the graphics terminal for output fields. For example,
SECTION SIZE__________ is a case where SECTION SIZE should be scaled to match the
hardware characters that will be displayed in the __________ field. To best match the scale of
the hardware- generated characters, the tutorial text should be created at a scale where the
character height and width are 8 UORs.
Control information must reside on MicroStation level 63.

FrameWorks Plus Programmer's Reference

121

Parametric Modeling Language

The Tutorial Template


A blank PML tutorial template is delivered with FrameWorks Plus to make tutorial creation easier
and consistent with the delivered PML tutorials. This template is in the file pml.dgn, located in the
fwplus\pml directory. It is best to use the Fence Copy command when copying this template to
ensure that all levels, including 63, are on before copying.

Figure 4: PML Tutorial Template


We strongly recommend that you first copy the file pml.dgn to your working directory so that
you do not corrupt any of the original tutorials delivered with FrameWorks Plus.

Using MSTUT.UCM
To assist in creating tutorial control information, a standard user command called mstut.ucm is
supplied with MicroStation. It automatically handles many of the formatting considerations for
control information. The user command prompts and responses are as follows:
1. ENTER SERVICING SOFTWARE NAME
Your response is used by MSTUT.UCM to construct the tutorial text node. In the cases where
an existing tutorial is being modified (thus the text node already exists), skip the prompt by
entering a blank character (Space Bar) followed by a Return. Then specify the MicroStation
File Builder utility as the servicing software for the tutorial by entering FB.
2. ENTER TEXT NODE ORIGIN
This prompt displays only if you have entered a nonblank response to the previous prompt.
Your response is used by MSTUT.UCM to determine the origin for the tutorial text node. While

122

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


the tutorial text node must be included as a part of a tutorial cell, its location within the cell is
not important. A text node origin that is somewhat near the tutorial cell's origin (lower left
corner) is often chosen.
3. ENTER ACTION TYPE (O, I, P, U, C, R, S, D, A, K, T)
Type I in response to this prompt to select an input control field.

4. ENTER WIDTH OF FIELD


This prompt is displayed when defining output fields. Key in a number to represent the
maximum number of characters that can reside in this field. Valid field widths range from 1 to
80 characters.
5. ENTER FIELD NUMBER
This prompt is displayed when defining input fields. Key in a number that can be used to
uniquely identify the field (1 to 199).
Field numbers should never be duplicated on the same tutorial.
6. INPUT LOWER LEFT FIELD CORNER
This prompt is displayed when defining input fields. Place a data point on the tutorial to
indicate where the lower left corner of the field should be located.
7. DEFINE UPPER RIGHT CORNER
Place a data point in the desired location to define the upper right corner of the graphic
selection field.
8. ENTER OPTION NUMBER
This prompt is displayed when defining an Application graphic selection field. Key in a value to
define the unique number for this field. Once you have answered all of the prompts for a
control field, MSTUT.UCM constructs and outputs the appropriate level 63 text string. For a
graphic selection field, the range of the text string that is generated is manipulated to coincide
with the rectangular area designated. Thus, you must take care not to manipulate the graphic
selection field text elements unless you can be certain that moving them will not cause the
range of the text element to be recalculated.

FrameWorks Plus Programmer's Reference

123

Parametric Modeling Language

9. PML Tutorial Cell Levels When modifying an existing tutorial, it is best if you delete any
graphic selection field text strings that are to be changed and then redefine them using the
MSTUT.UCM user command. This approach ensures that the element range is correct.
In the course of using MSTUT.UCM, several error messages may display. These messages and
what they mean are listed as follows:
Error Message: INVALID COMMAND TYPE
Recovery: This message indicates that you have not keyed in one of the valid command types (O,
I, P, U, C, R, S, D, A, K, or T). PML tutorials can only contain I fields.
Error Message: INVALID BLOCK
Recovery: This message indicates an error in defining the rectangular area for a graphic selection
field. In particular, the point entered as the lower left corner was found to be higher or to the right of
the point defined as the top right corner.
Error Message: WIDTH MUST BE LESS THAN 81
Recovery: This message is displayed if you specify an output field width that exceeds the
maximum allowable value of 80 characters.

Adding a Tutorial Cell to a Cell Library


A tutorial cell can be added to a cell library using the MicroStation Create Cell command. The
syntax of this command is CC=cell,description,T, where cell identifies the name of the tutorial
cell to add to the cell library, and description is an optional description (up to 27 characters long)
for the cell. T identifies the cell as a tutorial cell.

124

FrameWorks Plus Programmer's Reference

Parametric Modeling Language


The Create Cell command adds the tutorial to your current cell library. Thus, in order to add a
tutorial to your cell library, you must first make it your current cell library.

Tutorial Cell/Cell Library Concept


A tutorial cell can be added to a cell library by meeting these criteria:
1. First attaching a 2D cell library with write access.
2. Selecting or fencing elements.
3. Specifying a cell origin.
4. The attached cell library's dimensionality (2D or 3D) matches the design file's dimensionality.

Activating / Deactivating a Tutorial


PML will activate the tutorial through the PML Tutor command (see PML Tutorials (on page 119)).
This command allows you to define both the tutorial name and the cell library in which the tutorial
resides.
Every issuance of a Tutor command invokes a tutorial. There are no limits to the number of
tutorials that can be invoked in a single PML program.
PML automatically deactivates the tutorial when you reset out.

Tutorial Display Considerations


When a tutorial is activated, it is displayed in a view called the tutorial view. The default tutorial
view is View 5. However, using the MicroStation Set Tutorial View command, any other of the
eight views can be designated, except for the views displaying the screen menus.
When a tutorial is displayed, the tutorial view is treated as if all display levels (1-62) are turned ON.
Slow Display is used for the text, font, cells, and line weight. This allows a tutorial to be used as a
sample display area to help you choose text fonts or line styles.
The tutorial view can be maintained between design sessions by using the MicroStation File>
Save Settings command.

FrameWorks Plus Programmer's Reference

125

Parametric Modeling Language

Create a PML Tutorial


1. Copy the PML tutorial template. This is a blank PML tutorial delivered with FrameWorks Plus
to make tutorial creation easier and consistent with the delivered PML tutorials. It is best to
use the Fence Copy command. Make sure that all levels, including level 63, are displayed
before copying.
2. Using MicroStation, create the graphics you want on the PML tutorial copy you have just
made. Create your tutorial in a 2-D design file.
3. Type UC=MSTUT.UCM
4. ENTER SERVICING SOFTWARE; RESET TO EXIT
Type FB (in all caps) or a blank character (space) if the text node already exists.

This defines the MicroStation File Builder utility as the servicing software for your PML
tutorial.
OR
Right-click to exit the user command.
5. ENTER TEXT NODE ORIGIN; RESET TO SKIP TEXT NODE PLACEMENT
Right-click to skip this step.

This step is skipped if a blank was entered in step 4.


Only one text node can be placed on a tutorial.
6. ENTER COMMAND TYPE (O, I, P, U, C, R, S, D, A, K, T); RESET TO EXIT
Type I to define an Input field.
OR
Press reset to exit the user command.
7. ENTER WIDTH OF FIELD; RESET TO REDEFINE COMMAND
Type a number between 1 and 80 to define the number of characters you want to allow for
your O field.

This number determines the accuracy of the variable.


OR
Press reset to return to step 6 to redefine the command type.
8. ENTER FIELD NUMBER
Type an integer between 1 and 199 to identify the field number.

Remember that this number corresponds to the variable number defined in your PML
program and reflects the order, relative to the other variables you want to define, that the field
will be activated.
9. INPUT LOWER LEFT FIELD CORNER
Place a data point on the tutorial to define the lower left corner of the O field.

The text node O,n,m appears on the tutorial, where n represents the width of the field, and m
represents the field number.
You are returned to step 7 to allow you to define another O field. This process continues until
you right-click to break out of the loop and return to step 6.
10. DEFINE LOWER LEFT CORNER OR NEW COMMAND TYPE
Place a data point to define the lower left corner of the graphic selection field for the
application command.

126

FrameWorks Plus Programmer's Reference

Parametric Modeling Language

After you have written your PML program, you will want to design a tutorial to act as an
interface for it. It is a good idea to sketch out the tutorial before you begin. Because the
sequence of which field is activated is tied to the variable number, you will need to refer to
your PML program to review the order and number of the variables you must define in the
tutorial.
We strongly recommend that you first copy the file pml.dgn to your working directory so
that you do not corrupt any of the original tutorials delivered with FrameWorks Plus.

Creating a Cell from the PML Tutorial


1. Place a Fence Block around the PML tutorial you have created, leaving approximately 1/4
inch or 1 centimeter clearance between the fence and the outer edge of the tutorial. All control
information should be included in the fence.
2. Using the MicroStation command Define Cell Origin, place a tentative point on the lower left
corner of the tutorial, and then key in DL=-2,-2 and press the data button on the mouse to
confirm the placement of the cell origin.

A capital O is placed to identify the definition of the cell origin.


3. Use the MicroStation Display Header command to check that the correct cell library is
attached.
4. Key in the following to create the tutorial cell:
CC=CELL_NAME, BRIEF DESCRIPTION, T
where CELL_NAME should correspond to the title of the tutorial, BRIEF DESCRIPTION
should describe the function of the tutorial to help when reviewing your tutorial list, and T
identifies the cell as a tutorial cell.
Before proceeding, a tutorial must have been created.

Edit a PML Tutorial


1. Key in CD=CELL_NAME to delete from the cell library the cell you want to edit.
2. Select the MicroStation Design Options command.
3. Select the File> Cell Library> Compress command to recover the space occupied by the
cell you have just deleted.
4. Edit the tutorial.
5. If you want to add fields, you must use the tutor.ucm user command.
6. If you want to delete fields, you can use the MicroStation Delete Element or Delete Fence
Contents command.
7. If you want to move fields, you can do so using the MicroStation Move Element or Move
Fence Contents commands.
We recommend that you delete and redefine A fields rather than try to move them as
overlapping the graphic selection fields is likely to happen.
8. Redefine the tutorial as a cell using the procedure described in the previous section.
Check to be sure that you have the correct cell library attached before deleting any
tutorial cells.

FrameWorks Plus Programmer's Reference

127

Index
A
Activating / Deactivating a Tutorial 125
Adding a Tutorial Cell to a Cell Library 124
aecFPL_addUpdLoadCase 17
aecFPL_addUpdLoadComb 17
aecFPL_addUsrData 17
aecFPL_areaCutOut 18
aecFPL_buildAnalysisElements 20
aecFPL_buildAnalysisNodeTable 20
aecFPL_deleteArc 21
aecFPL_deleteLoad 21
aecFPL_deleteMember 22
aecFPL_deleteSolid 22
aecFPL_deleteUsrData 23
aecFPL_displayArc 23
aecFPL_displayMember 24
aecFPL_displaySolid 24
aecFPL_get3rdPartySoftware 25
aecFPL_getArrayOfNmdGrp 25
aecFPL_getAttachedModelInfo 26
aecFPL_getCodeParms 26
aecFPL_getCustomCodeParms 27
aecFPL_getDefaults 28
aecFPL_getDesignParms 28
aecFPL_getFWPversionNo 29
aecFPL_getISTrecord 29
aecFPL_getNmdGrpIndex 30
aecFPL_getSecTabNameAndUnts 30
aecFPL_getSection 31
aecFPL_getTypeAndID 31
aecFPL_getUnits 32
aecFPL_initialize 32
aecFPL_joinMembers 32
aecFPL_modifyArc 33
aecFPL_modifyLoad 33
aecFPL_modifyMember 34
aecFPL_modifySolid 34
aecFPL_placeArc 35
aecFPL_placeLoad 36
aecFPL_placeMember 36
aecFPL_placeSolid 37
aecFPL_populateNmdGrpData 37
aecFPL_queryArc 38
aecFPL_queryByNamedGroup 39
aecFPL_queryLoad 39
aecFPL_queryLoadCase 40
aecFPL_queryLoadCaseList 41
aecFPL_queryLoadComb 41

FrameWorks Plus Programmer's Reference

aecFPL_queryLoadCombList 42
aecFPL_queryMember 43
aecFPL_queryMemberSectionTable 43
aecFPL_querySectionTableInfo 44
aecFPL_querySolid 45
aecFPL_querySolidDataEx 45
aecFPL_querySolidType 46
aecFPL_readUsrData 47
aecFPL_splitMember 47
aecFPL_updateUsrData 48
aecFPLState_setFunction 48
Arc Components - Beam, Brace, Column
62
Area Components - Solids and Holes 62
ASCII 71
Assign 72

B
Bounds 73

C
Close 74
Copy Assembly 75
Copy Group 76
Copy Last Element 78
Create a PML Tutorial 126
Creating a Cell from the PML Tutorial 127
Creating the Tutorial Graphics 121
Creating Your Own FPL Programs 10
Current Requirements 64

D
Default 78
Delete 81
Do 82

E
Edit a PML Tutorial 127
Else 83
Elseif 83
End Assembly 84
End Group 85
Enddo 85
Endif 86
Endwhile 87
Evaluate 87
Exit 89

129

Index

F
FPL Example Programs 11
FPL Functions 14
FPLonData 49
FPLonKeyin 49
FPLonReset 50
FPLsetSymb 50
FrameWorks Programming Language 9

H
Help 89

I
If 89
Inquire 90

L
Language 90
Language File 63
Linear Components - Beam, Brace, Column
61

M
Mdr 90
Message 91
Message File 64
Mstn 91

O
Open 91
Origin 92
Override 93

P
Parametric Modeling Language 51
Place Arc 94
Place Area 95
Place Beam 97
Place Brace 99
Place Column 100
Place Hole 102
Place Line 103
Place Linestring 102
Place Primitive Arc 104
Place Shape 104
Place Text 105
Place Volume 106
PML Commands 67
PML Recommended Methodology 56

130

PML Tutorials 119


Preface 7
Programming in PML 57

R
Read 107
Run 108

S
Save 109
Scan 110
Section 111
Section Orientation 66
Show Graphics 112
Start Assembly 113
Start Group 113

T
The PML Commands 58
The Tutorial Template 122
To run a FPL program 9
To run a PML program 55
Translate 114
Tutorial 114
Tutorial Cell Format 120
Tutorial Control Information 120
Tutorial Display Considerations 125
Tutorial Display Information 121
Tutorial Text Node 120

U
Units 114
Update 115
Using MSTUT.UCM 122

V
Volume Components 63

W
Wakeup 117
Wakeup File 63
While 117
Write 118

FrameWorks Plus Programmer's Reference

You might also like