Measuring Area of a Fill Surface
Measuring Area of a Fill Surface
(OP)
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
Thanks
Ian Cuz
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
Thanks
Ian Cuz





RE: Measuring Area of a Fill Surface
maybe replace by
Set formula1 = relations1.CreateFormula("Formula.1", "", dimension1, "area(" & strFunctionInputObjectName & ") ")
indocti discant et ament meminisse periti
RE: Measuring Area of a Fill Surface
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