本帖最后由 雪山飞狐_lzh 于 2015-4-6 22:29 编辑
1.0测试版 解压上面文件后,把他们放到d:\TlsCad\Bin里面 本来写注册表可以直接做到程序里 但是测试版先随意了
运行1.reg注册
然后在cad里nerload安装。。。正式版上面的步骤会少掉
VBA引用TlsCad.Common.tlb
测试代码
- Sub tt()
- Dim cm As TlsCad_Common.CurveManager
- Set cm = Application.GetInterfaceObject("TlsCad.Common.CurveManager")
- Dim obj As AcadEntity, pnts(1)
- ThisDrawing.Utility.GetEntity obj, pnts(0)
- Dim cc As TlsCad_Common.Curve
- Set cc = cm.Add(obj.ObjectID)
- pnts(0) = cc.GetClosestPointTo(pnts(0), False)
- pnts(1) = ThisDrawing.Utility.GetPoint()
- pnts(1) = cc.GetClosestPointTo(pnts(1), False)
- cc.SplitByParams cc.GetParamsByPoints(pnts)
- obj.Delete
- cc.Dispose
- End Sub
|