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


Measuring Area of a Fill Surface

Measuring Area of a Fill Surface

Measuring Area of a Fill Surface

Hi everyone
I am trying to create an Parameter & Relation to hold the Area Value of a Fill Surface which can be included
within a loop
I do not want to use the SPAWorkBench measure
I am having trouble getting the Relation.CreateFormula expression to recognize the String I have built manually

See below:-

'* Recorded Macro syntax for the creation of an Area Formula Relation
' Set formula1 = relations1.CreateFormula("", "", dimension1, "area(AREA_FILLS\Fill.2 ) ")

'* Build area function Text String
strFunctionInputObjectName = "AREA_FILLS\" & strSelectedElementName

'* Message for testing purposes
MsgBox "Manually Built Text String = " & strFunctionInputObjectName, vbOKOnly, "Built String Output"

'* Use the built text string within the Create Formula function
'* This line is where the function FAILS to correctly associate the FILL surface Relation

Set formula1 = relations1.CreateFormula("Formula.1", "", dimension1, "area(strFunctionInputObjectName) ")

Can anyone help
Ian Cuz

RE: Measuring Area of a Fill Surface

Set formula1 = relations1.CreateFormula("Formula.1", "", dimension1, "area(strFunctionInputObjectName) ")

maybe replace by

Set formula1 = relations1.CreateFormula("Formula.1", "", dimension1, "area(" & strFunctionInputObjectName & ") ")

Eric N.
indocti discant et ament meminisse periti

RE: Measuring Area of a Fill Surface

Many thanks itsmyjob

This alteration enabled the function to work correctly

I also have a need to create a Distance Relation between a Surface and a Point
I will attempt to adapt this answer into that solution too

Ian Cuz

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!


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close