Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing properties standard shape reference point location by API function .pval(51) in v10.3.1

Status
Not open for further replies.

faremusai

Mechanical
Feb 23, 2016
23
0
0
HK
The default location of reference point for a standard shape in FEMAP is "1". I want to change it to other location by using the API function .pval(51) e.g. to point 7. I have tried using the command pr.pval(51) = 7 then, .ComputeStdShape, then pr.Put(ID) to update the properties. There is no error nor warning messages after running the script. But the reference point was not updated, still at location "1".

If the reference point was changed manually throught tge "Properties" dialogue box and then read the new value by using the function Msgbox "xxx: " & pr.pval(51), the new reference point location "7' was displayed.

If the command .ComputeStdShape was removed or .pval(51) was moved to a location after the .ComputeStdShape command, the reference point location was updated as expected.

Is it true that the command .pval(51) CANNOT be used before the command .ComputeStdShape?

 
Replies continue below

Recommended for you

faremusai,

For future inquiries, please use the regularly monitored FEMAP forum found here:

You are close - the issue is that you need to use "pr.Put( pr.ID )" BEFORE "pr.ComputeStdShape(...)". Otherwise, you have not updated the property with your new reference point and you will always be computing on the original, unchanged, property.
 
Status
Not open for further replies.
Back
Top