HyperWorks Desktop

Import Templates

Import Templates

Previous topic Next topic Expand/collapse all hidden text  

Import Templates

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Templates can be imported by means of the File > Import menu, or by means of the the Import toolbar icon fileImport-24.

Templates can be created to read ASCII files that are formatted differently, thus supporting import of multiple file formats.  The templates are stored in the <install_directory>/io/model_readers/feinput/. Each template works on only one specific format file.  To read in metadata, the required headings must be added to the template requests and record blocks.  You may wish to examine an example simple file format template.

Connector templates are registered in the spotweld.cfg file under the same directory.   For custom templates, a spotweld_format directory must exist in the same location as the master weld file.  The spotweld.cfg file must contain only the names of all the registered weld templates.  You can also see an example of a master weld file import template.

 

hmtoggle_plus1greyHyperGraph and HyperStudy Import Template Example

An example of an import template used with HyperGraph or HyperStudy is shown below:

 

// HWVERSION_8.0-100_Dec 1 2006_5

// (c) 2006 - Altair Engineering, Inc.  All rights reserved.

// Contains trade secrets of ALTAIR Engineering, INC.

// Copyright notice does not imply publication.

// Copyright (c) 2000 - 2002, Altair Engineering, Inc. All rights reserved.

// Contains trade secrets of ALTAIR Engineering, INC.

// Copyright notice does not imply publication.

// Decompilation or disassembly of this software is strictly prohibited.

// Excel column "Subcase" template

 

header

{

    set mark

    type "Boeing Data"

    

    set numrecords= count("Subcase", "END")

    set numrequests = 1

    set numcomponents = 7    

}

 

record

{

        read null

        readln request

    

}  

 

request

{

do numcomponents

{

read component

}

}

hmtoggle_plus1greyMaster Weld File Format

An example for a specific master weld file format is shown below:

 

# Index::T::X::Y::Z::EID1:: EID2:: EID3::

 1:: 3:: 48.4375:: 9.375  :: 2.0 :: 3:: 2:: 1::

Weld Template

 

int num

header

{  

    type "CONNECTORS"

    set mark

    find "[0-9]+::"

    rewind

    

    set num = 0

    if

    {

        do 1000000

        {

            if { isdigit } then { set num = sum(num, 1) }  

            readln null

        }

    }

    set numrecords = num

    set numrequests = 9

    requests "ID/T/X/Y/Z/EID1/EID2/EID3/EID4"

    set numcomponents = 1

    components "Value"

}

 

record

{

    read request // ID

    qfind "::"

    set mark

    read request  //T

    rewind

    read num

    qfind "::"

    read request // X

    qfind "::"

    read request // Y

    qfind "::"

    read request // Z

    do num

    {

        qfind "::"

        read request // EID

    }

    set num = diff(4, num)

    do num

    {

        read constant 0 // fake EID

    }

    readln null

}