Navigation: Scripting Reference Manual > Functions & Subroutines > ElemAddPlaneWithNsidedHole

 

ElemAddPlaneWithNsidedHole

 

Contact Us: fredsupport@photonengr.com

 

Description

This function adds a new Plane with N-Sided Hole type Element Primitive node and returns the node number of the added object.

 

Syntax

epNode = ElemAddPlaneWithNsidedHole( tEnt )

 

Parameters

epNode (Long)

Node number of the element primitive that was added.

 

tEnt As T_ENTITY

Data structure containing the generic entity information (name, parent, description, etc.) required to add a node to the object tree.

 

Example

The example below shows how to initialize a T_ENTITY structure, add an Plane with N-Sided Hole type element primitive and then modify the element primitive parameters.

Sub Main

 

    'Initialize the generic element data

    Dim tEnt As T_ENTITY

    InitEntity( tEnt )

    tEnt.name   = "EP Plane with N-Sided Hole"

    tEnt.parent = 2 'Geometry folder

 

    'Create the element primitive node

    Dim epNode As Long

    epNode = ElemAddPlaneWithNsidedHole( tEnt )

 

    'Modify the element primitive parameters

    ElemSetParmValue( epNode, 0, 6 )  'X semi-aperture (semi-width)

    ElemSetParmValue( epNode, 1, 3 )  'Y semi-aperture (semi-height)

    ElemSetParmValue( epNode, 2, 0 )  'Plane aperture shape: 0=rectangular/square, 1=elliptical/circular

    ElemSetParmValue( epNode, 3, 6 )  'Number of sides of inner-hole

    ElemSetParmValue( epNode, 4, 8 )  'Inner hole semi-aperture

 

    'Update the model

    Update

 

End Sub

 

See Also

 

T_ENTITY

Element Primitive Script Commands

Element Composite (boolean) Script Commands

 

 

 

 

 

 

Copyright © Photon Engineering, LLC