SW-自动标注中心线宏代码

更新时间:2023-07-22 23:08:40 阅读: 评论:0

Sub main()
Set swApp = Application.SldWorks
Set DrawingDoc = swApp.ActiveDoc
If DrawingDoc.GetType <> 3 Then Exit Sub
Set SelMgr = DrawingDoc.SelectionManager
If SelMgr.GetSelectedObjectType2(1) <> 12 Then Exit Sub
2013高考理综试题及答案Set swview = SelMgr.GetSelectedObjectsDrawingView(1)
Set swDrawComp = swview.RootDrawingComponent
DrawingDoc.ActivateView swDrawComp.View.GetName2
heavy的比较级和最高级Set Part = swview.ReferencedDocument
Set FeatObj = Part.FirstFeature
FeatObjname = FeatObj.GetTypeName
2013年诺贝尔奖
merciWhile FeatObjname <> "OriginProfileFeature"
Set FeatObj = FeatObj.GetNextFeature
FeatObjname = FeatObj.GetTypeName
Wend
游乐场英文Featname = FeatObj.Name
ViewOutlines = swview.GetOutline
ViewCXform = swview.GetXform
continueViewXform = swview.GetViewXform
philexHp1x = (ViewOutlines(0) - ViewCXform(0)) / ViewXform(12)
Hp1y = ((ViewOutlines(1) + ViewOutlines(3)) / 2 - ViewCXform(1)) / ViewXform(12)
Hp2x = (ViewOutlines(2) - ViewCXform(0)) / ViewXform(12)
Hp2y = Hp1y
Vp1x = ((ViewOutlines(0) + ViewOutlines(2)) / 2 - ViewCXform(0)) / ViewXform(12)
Vp1y = (ViewOutlines(3) - ViewCXform(1)) / ViewXform(12)sos的意思
Vp2x = Vp1x
Vp2y = (ViewOutlines(1) - ViewCXform(1)) / ViewXform(12)
DrawingDoc.SetAddToDB (True)
常用英语口语大全
Set SkLineH = DrawingDoc.SketchManager.CreateCenterLine(Hp1x, Hp1y, 0, Hp2x, Hp2y, 0)
DrawingDoc.SketchAddConstraints "sgHORIZONTAL2D"
boolstatus = DrawingDoc.Extension.SelectByID2("Point1@" & Featname & "@" & swDrawComp.Name & "@" & swDrawComp.View.GetName2, "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0)
DrawingDoc.SketchAddConstraints "sgCOINCIDENT"
Set SkLineV = DrawingDoc.SketchManager.CreateCenterLine(Vp1x, Vp1y, 0, Vp2x, Vp2y, 0)
DrawingDoc.SketchAddConstraints "sgVERTICAL2D"
boolstatus = DrawingDoc.Extension.SelectByID2("Point1@" & Featname & "@" & swDrawComp.Name & "@" & swDrawComp.View.GetName2, "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0)
DrawingDoc.SketchAddConstraints "sgCOINCIDENT"
DrawingDoc.ClearSelection2 True
End Subhm啥意思

本文发布于:2023-07-22 23:08:40,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/1111661.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:高考   试题   答案
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图