返回可用于解决指定错误的对象数组。AcStFix 支持的平台:仅窗口 Namespace:AcStMgr 集会:AcStMgr.tlb 签名 - 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) { ...; } Return Value (RetVal)No return value. RemarksNo additional remarks. Release InformationReleases: AutoCAD 2004 and later
Examples - AcStError objectVB.NET: Not available C#: Not available Examples - IAcStPlugin2 interfaceVB.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-1-8 19:43
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.