iCAx开思网

标题: 有些尺寸将被隐藏。 [打印本页]

作者: ning58    时间: 2015-4-16 17:19
标题: 有些尺寸将被隐藏。
本帖最后由 ning58 于 2015-4-16 17:28 编辑

[attach]1217696[/attach]
完全自己用API方法编制的程序,运行结果提示如上图。




Function Create2View(SwDraw As DrawingDoc, AsmPrt, ConfName, View1, X1, Y1, View2, X2, Y2, oScale, RegExp As RegExp)
   Dim ViewName, SwView As View, SwView1 As View
     ViewName = "Front"
     ViewName = "前视"
         ''
         With SwDraw
             ''''
             Set SwView = .CreateDrawViewFromModelView3(AsmPrt, "*" & ViewName, X1 / 1000, Y1 / 1000, 0)       ''
             SwView.SetName2 View1
             ''
             Set SwView1 = .CreateUnfoldedViewAt3(X2 / 1000, Y2 / 1000, 0, False)            '
             SwView1.SetName2 View2
             ''
             ''
             .InsertModelAnnotations3 0, swInsertDimensionsMarkedForDrawing, True, True, True, False
             ''
             .InsertModelAnnotations3 0, swInsertDimensions, True, True, True, False
             ''Debug.Print SwView.Name,

             SwView.ScaleDecimal = 1 / oScale
             SwView.ReferencedConfiguration = ConfName
             SwView1.ReferencedConfiguration = ConfName
             'Stop
         End With
         ''
         If Not RegExp Is Nothing Then
            delDim SwDraw, SwView, RegExp
         End If
         With SwDraw
            .ForceRebuild3 True
            .ViewZoomtofit
         End With
End Function






欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3