GetAllFixes 方法 (ActiveX/CSP)
返回可用于解决指定错误的对象数组。AcStFix 支持的平台:仅限 Windows 命名空间:AcStMgr (英语) 集会:AcStMgr.tlb Signature - AcStError 对象VB.NET: object.GetAllFixes(fixArray, recommendedFixIndex) C#: object.GetAllFixes(ref fixArray, ref recommendedFixIndex); 签名 - IAcStPlugin2 接口VB.NET: Public Sub GetAllFixes(pError, fixArray, recommendedFixIndex) _
Implements IAcStPlugin2.GetAllFixes
...
End Sub
C#: public void GetAllFixes(pError, ref fixArray, ref recommendedFixIndex)
{
...;
}
返回值 (RetVal)无返回值。 言论没有其他评论。 发行信息释放:AutoCAD 2004 及更高版本
示例 - AcStError 对象VB.NET: Not available C#: Not available 示例 - IAcStPlugin2 接口VB.NET: Public Sub GetAllFixes(ByVal pError As AcStError, _
ByRef fixArray As Object, _
ByRef recommendedFixIndex As Integer) _
Implements IAcStPlugin2.GetAllFixes
' << Change based on standards implementation >>
If IsNothing(pError) = False Then
Dim arr(UBound(m_LayerCacheArray)) As IAcStFix
Dim i As Integer
recommendedFixIndex = -1
m_FixCnt = 0
' Check the cache of fixes
If m_LayerCacheArray.Length > 0 Then
' Get the properties of the fix
For i = LBound(m_LayerCacheArray) To UBound(m_LayerCacheArray)
arr(i) = m_LayerCacheArray(i).StandardsFix
Next
fixArray = arr
m_FixArray = fixArray
Dim tmpFix As New AcStFix()
' Find the recommended fix for the error; the fix object does need to be retained
If Not GetRecommendedFix(pError) Is Nothing Then
recommendedFixIndex = m_RecommendedFixIndex
End If
End If
' Was a recommended fix found
If recommendedFixIndex = -1 Then
' No recommended fix found, set the proper result status flag for the error object
pError.ResultStatus = AcStResultStatus.acStResNoRecommendedFix
End If
End If
End Sub
C#: public void GetAllFixes(AcStError pError, ref object fixArray, ref int recommendedFixIndex)
{
// << Change based on standards implementation >>
if ((pError == null) == false)
{
int nLBound = m_LayerCacheArray.GetLowerBound(0);
int nUBound = m_LayerCacheArray.GetUpperBound(0);
IAcStFix[] arr = new IAcStFix[nUBound + 1];
int i = 0;
recommendedFixIndex = -1;
m_FixCnt = 0;
// Check the cache of fixes
if (m_LayerCacheArray.Length > 0)
{
// Get the properties of the fix
for (i = nLBound; i <= nUBound; i++)
{
arr[i] = m_LayerCacheArray[i].StandardsFix;
}
fixArray = arr;
m_FixArray = fixArray;
AcStFix tmpFix = new AcStFix();
// Find the recommended fix for the error; the fix object does need to be retained
if (GetRecommendedFix(pError) != null)
{
recommendedFixIndex = m_RecommendedFixIndex;
}
}
// Was a recommended fix found
if (recommendedFixIndex == -1)
{
// No recommended fix found, set the proper result status flag for the error object
pError.ResultStatus = AcStResultStatus.acStResNoRecommendedFix;
}
}
}
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-30 23:27
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.