SupportModeler Creating External Sizing Program
SupportModeler Creating External Sizing Program
Copyright
Copyright 1997-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.
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.
Trademarks
Intergraph, the Intergraph logo, PDS, SmartPlant, FrameWorks, I-Convert, I-Export, I-Sketch, SmartMarine, IntelliShip, INtools,
ISOGEN, MARIAN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or registered trademarks of
Intergraph Corporation or its subsidiaries in the United States and other countries. Microsoft and Windows are registered
trademarks of Microsoft Corporation. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation
and/or its affiliates. MicroStation is a registered trademark of Bentley Systems Inc, all rights reserved. Other brands and product
names are trademarks of their respective owners.
Contents
Preface PDS ................................................................................................................................................. 5
Document Purpose ...................................................................................................................................... 7
Using the Command Line to Pass Data .................................................................................................. 7
Script to Start Sizing Program and Place the Resulting Item ................................................................. 9
Summary ................................................................................................................................................. 9
PlaceItem File Format ........................................................................................................................... 10
Moving an Object Relative to its Origin ................................................................................................. 10
Rotating an Object ................................................................................................................................ 11
Tutorial: Creating a Place Items File ....................................................................................................... 13
The Nuts ..................................................................................................................................................... 14
Completed Script ....................................................................................................................................... 14
Contents
Preface PDS
This document provides command reference information and procedural instructions for the
task.
Preface PDS
Document Purpose
This document describes the format of the file that an external sizing program must create in order
for SupportModeler to be able to place the generated parts.
Sizing programs can be executed using SupportModeler to place an item script that automatically
starts the sizing program and then places the item created by the sizing program. You can use
SupportModeler to kick off the external sizing program, and pass any of the support information to
the sizing program (for example, Pipe OD, required length, insulation thickness, and so forth).
See Also
Using the Command Line to Pass Data (on page 7)
Script to Start Sizing Program and Place the Resulting Item (on page 9)
Place Items Script (on page 9)
The author of the sizing program will determine what information should be passed in and what
format it must be. As far as SupportModeler is concerned, any property of the Support can be
passed into the external program.
File Format
The file format created by the external sizing program must consist of a PROMPTS section and a
SCRIPT section. The SCRIPT section consists of a function call for each part that must be placed
into SupportModeler.
Document Purpose
SECTION 1
Sample Script
PROMPTS
CATEGORY,String, aSpecial
DESCRIPTION,String, Run Sizing Program and place the item created
PIPE_NOM_DIA , String , 6, Pipe Size: ($NOM_DIA_UNITS$) , QUERY , 1
PLACE_POINTS, Int, -102
LENGTH, Double
OBJ_LEN_UNITS, String , INCHES
SCRIPT
'Set up variables to hold data passed from SupportModeler
Number LENGTH
String PIPE_NOM_DIA
'Get the length and OD from SupportModeler
LENGTH = GetNProp( "LENGTH")
PIPE_NOM_DIA = GetSProp( "PIPE_NOM_DIA" )
'Run the Sizing Program. Tell it to create a new file called PlaceIt.itm,
'pass it the required length and the pipe OD
System( "SizingProgram.exe", 1, "PlaceIt.itm", STR(LENGTH), PIPE_NOM_DIA )
'When the Sizing Program completes, it will have created the PlaceIt.itm file
'use the PlaceItem function to place it at 0,0,0 relative to the user's data point
PlaceItem( "TestLibrary1", "PlaceIt", "", LOC(0,0,0) )
Intergraph can assist in creating a script file to run your sizing program.
Summary
In summary, the External Sizing program will be kicked off by SupportModeler. Information such
as pipe OD, insulation thickness and overall length of the support can be passed into the sizing
program on the command line. The sizing program must create a Place Items file.
Document Purpose
10
Document Purpose
Rotating an Object
In order to rotate an object, we can use one or more functions with the LOC command. There are
three possible functions: ROTX(), ROTY() and ROTZ(). These functions rotate the item about its
local X, Y or Z axis by the given angle in degrees. An example of the use of these modifiers is:
ROTZ(90) + LOC( 0,35,0 )
Rotx, Roty, Rotz
Converts an angle in degrees into an appropriate string to rotate in item. This function must
always be before or after a Loc() function. Use a plus (+) sign between the Loc and ROT
function to denote string concatenation.
Syntax
Rotx(angle, after)
where:
angle - Number, angle in degrees to rotate this item
after - Optional Number, flag to tell the function that the rotation is after the translation (Loc
function) 0 means before, 1 means after. If this parameter is left out, it is assumed that the
rotation happens before the translation
Returns
String containing a location string appropriate for passing into graphic primitive functions.
Example
Rotate before translation
AddArc( 45, 135, PIPE_DIA/2.0+10.0, ROTX(180)+LOC(0, -D/2.0, 0),
"OUTER_ARC" ) Rotate after translation
AddArc( 45, 135, PIPE_DIA/2.0+10.0, LOC(0, -D/2.0, 0)+ ROTX(180, 1),
"OUTER_ARC" )
These functions rotate the item about its local X, Y or Z axis by the given angle in degrees; for
example, ROTZ(90) + LOC( 0,35,0 ) In this case, the item rotates 90 degrees around its own Z
axis, then translates it 35 library units in the Y direction.
These functions return strings; for that reason, you must use the plus sign (+) to
concatenate them to the results of the LOC() function.
11
Document Purpose
12
SECTION 2
13
The Nuts
The Nuts
'The welded clevis
PlaceItem( "SM_Lisega_2010", "TYPE73", "", LOC(0,0,30+65+2775+65+65+80+1405+260+90+75), "size",
"736912" )
'The Nuts
PlaceItem(
PlaceItem(
PlaceItem(
PlaceItem(
PlaceItem(
PlaceItem(
"SM_Lisega_2010",
"SM_Lisega_2010",
"SM_Lisega_2010",
"SM_Lisega_2010",
"SM_Lisega_2010",
"SM_Lisega_2010",
"TYPE63",
"TYPE63",
"TYPE63",
"TYPE63",
"TYPE63",
"TYPE63",
"",
"",
"",
"",
"",
"",
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
"size",
"size",
"size",
"size",
"size",
"size",
"636928"
"636928"
"635928"
"635928"
"635928"
"635928"
)
)
)
)
)
)
Completed Script
PROMPTS
CATEGORY, String, aSpecial
DESCRIPTION, String, Imitate 202760013.L3D
PLACE_POINTS, Int, -102
SCRIPT
'vertical pipe clamp
PlaceItem( "SM_Lisega_2010", "TYPE46", "", LOC(0,0,0), "size", "463221", "l", "1000" )
'clevis with pin
PlaceItem( "SM_Lisega_2010", "TYPE61", "", ROTX (180)+LOC(500,0,30+65), "size", "615912" )
PlaceItem( "SM_Lisega_2010", "TYPE61", "", ROTX(180)+LOC(-500,0,30+65), "size", "615912" )
'rods
PlaceItem( "SM_Lisega_2010", "TYPE67B", "", LOC(500,0,30+65), "size", "665713", "length", "2775" )
PlaceItem( "SM_Lisega_2010", "TYPE67B", "", LOC(-500,0,30+65), "size", "665713", "length", "2775" )
'Middle clevis with pin
PlaceItem( "SM_Lisega_2010", "TYPE61", "", LOC(500,0,30+65+2775), "size", "615912" )
PlaceItem( "SM_Lisega_2010", "TYPE61", "", LOC(-500,0,30+65+2775), "size", "615912" )
'Trapeze
PlaceItem( "SM_Lisega_2010", "TYPE79B", "", ROTX(180)+LOC(0,0,30+65+2775+65+65), "size", "796339", "l", "1000" )
'Top clevis with pin
PlaceItem( "SM_Lisega_2010", "TYPE61", "", ROTX(180)+LOC(0,0,30+65+2775+65+65+80), "size", "616912" )
'Top threaded rod
PlaceItem( "SM_Lisega_2010", "TYPE67B", "", LOC(0,0,30+65+2775+65+65+80), "size", "676413", "length", "1405" )
'Variable Spring
PlaceItem( "SM_Lisega_2010", "TYPE21", "", LOC(0,0,30+65+2775+65+65+80+1405), "size", "216118", "dir", "up",
"working_trav", "0", "hot_load", "20" )
'Threaded stud
PlaceItem( "SM_Lisega_2010", "TYPE67A", "", LOC(0,0,30+65+2775+65+65+80+1405+260), "size", "676113" )
'The eye nut
PlaceItem( "SM_Lisega_2010", "TYPE60", "", LOC(0,0,30+65+2775+65+65+80+1405+260+90), "size", "606912" )
14
Completed Script
'The welded clevis
PlaceItem( "SM_Lisega_2010",
'The nuts
PlaceItem( "SM_Lisega_2010",
PlaceItem( "SM_Lisega_2010",
PlaceItem( "SM_Lisega_2010",
PlaceItem( "SM_Lisega_2010",
PlaceItem( "SM_Lisega_2010",
PlaceItem( "SM_Lisega_2010",
"",
"",
"",
"",
"",
"",
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
LOC(0,0,30+65+2775+65+65+80+1405+260+40),
"size",
"size",
"size",
"size",
"size",
"size",
"636928"
"636928"
"635928"
"635928"
"635928"
"635928"
)
)
)
)
)
)
15