×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Patran PCL - Using Variable for Field Name in Load Definition

Patran PCL - Using Variable for Field Name in Load Definition

Patran PCL - Using Variable for Field Name in Load Definition

(OP)
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!



 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources