您的当前位置:首页正文

SW几个特征分析

2021-08-03 来源:好走旅游网
特征

1. 拉伸凸台,程序运行访问并修改SolidWorks零件或装配体特征的数据。 具体程序运行如下:

Set CurFeature=SelMgr.GetSelectedObject3() If CurFeature Is Nothing Then

swApp.SendMsgToUser2 “ 请选择拉伸凸台/基体”,swMbWarning,swMbOk Exit Sub

End If

Set FeatData=CurFeature.GetDefintion

isGood=FeatData.AccessSelections(Model,Component) If Not is Good Then

swApp.SendMsgToUser2 “ 不能访问你选择的特征”,swMbWarning,swMbOk Exit Sub End If

Depth=FeatData.GetDepth(True) FeatData.SetDepth True,Depth*2

isGood=CurFeature.ModifyDefiniton(FeatData,Model,Component) If Not isGood Then

swApp.SendMsgToUser2 “不能修改特征尺寸数据”,swMbWarning,swMbOk FeatData.ReleaseSelectionAcess End If

获得所有螺纹装饰线的信息 Select Case sFeatType

Case”CosmeticThread”

List1.AddItem” ”&swSubFeat.Name&”[”& sFeatType”]” Set swCosThread=swSubFeat.GetDefinition

List1.AddItem”应用螺纹=”&swCosThread.ApplyThread

List1.AddItem”盲孔深度=”&swCosThread.BlindDepth*1000#&”mm” List1.AddItem”直 径=”&swCosThread.diameter*1000#&”mm” List1.AddItem”直径类型=”&swCosThread.DiameterType List1.AddItem”螺纹标注=”&swCosThread.ThreadCallout List1.AddItem””

End Select

Set swSubFeat=swSubFeat.GetNextSubFeature Loop

Set swFeat=swSubFeat.GetNextFeature Loop

因篇幅问题不能全部显示,请点此查看更多更全内容