FEAguy27
Mechanical
- Dec 22, 2010
- 1
Hi,
Does anyone know how to place a string variable into the slot for the field name ("f:fieldname") when creating a load in Patran PCL? As shown below, I initialize a string variable, define it, and then try to use it in the load definition. I am able to use it to name the load (first entry) with the variable name, but not to reference the field (10,11,12th entry) with the variable name.
--------------------------------------
STRING FieldName[32]
FieldName = "Test1"
...more code to create field named "Test1"....
loadsbcs_create2( FieldName, "Pressure", "Element Uniform", "2D", "Static", ["Element 1:375"], "FEM", "", "1.", ["", <I want to insert variable FieldName here> ,""], ["", "", ""] )
---------------------------------------
I have tried several ways including:
FieldName
"Fieldname"
(FieldName)
("FieldName")
“f:” // FieldName
$FieldName
"$FieldName"
($Fieldname)
created a new STRING var defined as “f:” // FieldName
tried to create a STRING array and replace the entire ["","",""]
Note: it does work if i manually enter the name "Test1":
loadsbcs_create2( FieldName, "Pressure", "Element Uniform", "2D", "Static", ["Element 1:375"], "FEM", "", "1.", ["","f:Test1",""], ["", "", ""] )
But I want it to reference the variable name so I can do this for multiple entries.
Let me know if you have any ideas - Thanks!
Does anyone know how to place a string variable into the slot for the field name ("f:fieldname") when creating a load in Patran PCL? As shown below, I initialize a string variable, define it, and then try to use it in the load definition. I am able to use it to name the load (first entry) with the variable name, but not to reference the field (10,11,12th entry) with the variable name.
--------------------------------------
STRING FieldName[32]
FieldName = "Test1"
...more code to create field named "Test1"....
loadsbcs_create2( FieldName, "Pressure", "Element Uniform", "2D", "Static", ["Element 1:375"], "FEM", "", "1.", ["", <I want to insert variable FieldName here> ,""], ["", "", ""] )
---------------------------------------
I have tried several ways including:
FieldName
"Fieldname"
(FieldName)
("FieldName")
“f:” // FieldName
$FieldName
"$FieldName"
($Fieldname)
created a new STRING var defined as “f:” // FieldName
tried to create a STRING array and replace the entire ["","",""]
Note: it does work if i manually enter the name "Test1":
loadsbcs_create2( FieldName, "Pressure", "Element Uniform", "2D", "Static", ["Element 1:375"], "FEM", "", "1.", ["","f:Test1",""], ["", "", ""] )
But I want it to reference the variable name so I can do this for multiple entries.
Let me know if you have any ideas - Thanks!