In Geospatial sample code , the way to set the arcmodes using by StartPlaceCompCurveOperation
method is by the predefined operation named "CompCurv_Ops".
So ,How to set the object "CompCurveParams" programly to enable the the function as the "CompCurv_Ops" object .
I think if you look in the Standard Ops library, in the Library module, under the ProcessPlaceCompCurve function, you will see the code as follows :
' --- if all options are shown in tool settings then use their values, else set default --- If (showAllOptions) Then oUseRadius.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/useRadius" oForceTangent.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/forceTangent" oUseArcLength.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/useArcLength" oRadius.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/radius" oArcLength.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/arcLength" oRevertToLinear.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/revertToLinear" oClosed.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/closed" oReversed.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/reversed" oSeparated.SetTypeAndValue ValueType_PROPERTY, "CompCurv_Ops/separateComponents" Else oUseRadius.SetTypeAndValue ValueType_VALUE, "0" oForceTangent.SetTypeAndValue ValueType_VALUE, "0" oUseArcLength.SetTypeAndValue ValueType_VALUE, "0" oRadius.SetTypeAndValue ValueType_VALUE, "10" oArcLength.SetTypeAndValue ValueType_VALUE, "10" oRevertToLinear.SetTypeAndValue ValueType_VALUE, "1" oClosed.SetTypeAndValue ValueType_VALUE, "0" oReversed.SetTypeAndValue ValueType_VALUE, "0" oSeparated.SetTypeAndValue ValueType_VALUE, "0"
So, using the else block as a example, it sets the values directly, the first part of the if statement gets these from the form values.
HTH
Jerry
Hi ,jerry:
I'm sorry for delaying to write back your message.My question is how to change the drawmode between linemode,arcmode and BSLine mode . In the geo_sample. The Road feature charting method give three charting ways in the 'Segment Modes' frame.I want to know how to do that funtionality programmly.
The XFT assembly give the 'PlaceCompCurveOp' operation. This operation can tell how to draw arc line by setting the parameters in your article above?
Hello sphinxo,
The Road feature placement code is available in ..\Workspace\Projects\Examples\Geospatial\geo_example\designer\vba\example.mvba. See PlaceRoad subroutine in SimpleExamples module. (You may already have seen this, but thought I would mention it for completeness)
You can see the "CompCurv_Ops/ArcModes" property definition in Map\xml\operations\required\CompCurv_Ops.xml. In each "button" definition, note the "checked" attribute value. The CompCurveOp code reads this property's value and compares the value to the possible "checked" values. So, you do not need to set anything in CompCurveParams to instruct the CompCurveOp code to use this property.
To change the value of ArcModes, you can use the PropMgr::SetProperty method. In the example below, I set the "Segment Mode" to "Arc By Center" no matter what the client's preference previously was. (ArcModes property stores the last used value in "client" preferences and the InitializeOperationProperties call will set CompCurv_Ops/ArcModes to this last used value, so I set the property to my value after the InitializeOperationProperties call.).
If False = xft.PropMgr.OperationCached("CompCurv_Ops") Then xft.PropMgr.InitializeOperationProperties "CompCurv_Ops", "placing" xft.PropMgr.SetProperty "CompCurv_Ops/ArcModes", "ArcByCenter" End If
Regards,
Chris