ArcFM Engine Developer Guide
SetProposedGeometry Method (IMMEditTask)


IMMProposedObject

This method executes when the user finishes the edit sketch in ArcMap, immediately after the OnFinishSketch method on the IEditTask interface. Set the shape of the proposed object in this method.

Syntax
'Declaration
 
Sub SetProposedGeometry( _
   ByVal pProposed As IMMProposedObject _
) 
'Usage
 
Dim instance As IMMEditTask
Dim pProposed As IMMProposedObject
 
instance.SetProposedGeometry(pProposed)
void SetProposedGeometry( 
   IMMProposedObject pProposed
)

Parameters

pProposed
IMMProposedObject
Remarks

This method is NOT called when creating a template edit task. IMMEditTask calls IMMProposedObject2::SetProposedGeometry to allow the geometry to come from the template itself.

Example
The following code sample shows how IMMEditTask::SetProprosedGeometry may be implemented.
Visual Basic Copy Code
Private Sub IMMEditTask_SetProposedGeometry ByVal pProposed As IMMProposedObject)

Dim pLine As ILine
Dim dAngle As Double
Set pLine = New Line
pLine.PutCoords m_pStartPoint, m_pEndingPoint

dAngle = pLine.Angle * (180 / m_dPI)
         If dAngle > 360 Then dAngle = dAngle - 360
If dAngle < 0 Then dAngle = dAngle + 360

Dim pFieldManager As IMMFieldManager
Dim pField As IMMFieldAdapter
Set pFieldManager = pProposed.FieldManager
Set pFieldManager.Shape = m_pStartPoint

Set pField = pFieldManager.FieldByName(m_sAngleField)
If Not pField Is Nothing Then
pField.Value = m_dAngle
End If
End Sub
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

IMMEditTask Interface
IMMEditTask Members

 

 


Send Comment