samideqlqpart 发表于 2017-10-26 15:07:09

秒表和调用功能

你好
我发现我的sub“armature”的调用太长
用秒表
我得到了一个惊人的案例
sw。start()
armature(acBlkTblRec,acCurDb,acTrans,New Point3d(origTextX,origTextY,0))
sw。Stop()
总计=软件。elapsed毫秒
Dim ed = Autodesk。AutoCAD . application services . application . document manager . mdiactivedocument . editor。write message(vbLf & " Total Duration:" & Total & " milliseconds ")
总持续时间为 4823毫秒
但当我在函数内部执行它时,总持续时间为25毫秒
Public Sub armature(ByRef acBlkTblRec作为BlockTableRecord,ByRef acCurDb作为Database,ByRef acTrans作为Transaction,_
ByVal origTEXT作为Point3d)
sw。start()
-
-
-
-
-
软件。Stop()
总计=软件。elapsed毫秒
Dim ed = Autodesk。AutoCAD . application services . application . document manager . mdiactivedocument . editor。WriteMessage(vbLf & "总持续时间:" & total & "毫秒")
End Sub
有什么问题吗?怎么了?
谢谢!
**** Hidden Message *****
页: [1]
查看完整版本: 秒表和调用功能