《参数设置》PPT课件.ppt

《参数设置》PPT课件.ppt

ID:51006548

大小:719.50 KB

页数:9页

时间:2020-03-17

《参数设置》PPT课件.ppt_第1页
《参数设置》PPT课件.ppt_第2页
《参数设置》PPT课件.ppt_第3页
《参数设置》PPT课件.ppt_第4页
《参数设置》PPT课件.ppt_第5页
资源描述:

《《参数设置》PPT课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、参数设置参数设置SW二次开发VB讲座一.自定义参数*自定义参数(零件、装配与图纸)参数设置SW二次开发VB讲座*自定义参数程序SetswApp=Application.SldWorksSetPart=swApp.ActiveDocDimCusPropMgrAsSldWorks.CustomPropertyManagerSetCusPropMgr=Part.Extension.CustomPropertyManager("")DimaddstatusAsLongaddstatus=CusPropMgr.

2、Add2("图号",swCustomInfoText,"AB-150-008")addstatus=CusPropMgr.Add2("Material",swCustomInfoText,Chr(34)+"SW-Material@零件1.SLDPRT"+Chr(34))addstatus=CusPropMgr.Add2("Weight",swCustomInfoText,Chr(34)+"SW-Mass@零件1.SLDPRT"+Chr(34))addstatus=CusPropMgr.Add2("日期

3、",swCustomInfoDate,"2011-08-15")参数设置SW二次开发VB讲座一.自定义参数*自定义参数更改、获取与删除addstatus=CusPropMgr.Set("图号","AB-150-007")addstr=CusPropMgr.Get(“Material”)CusPropMgr.Delete("日期")自定义参数遍历DimNamesAsVariantDimNamelongasLongDimNonameAsStringNamelong=CusPropMgr.CountName

4、s=CusPropMgr.GetNamesFori=0toNamelongNoname=Names(i)Nexti参数设置SW二次开发VB讲座一.自定义参数二.配置特定参数*配置特定参数参数设置SW二次开发VB讲座*配置特定参数SetswApp=Application.SldWorksSetPart=swApp.ActiveDocDimretvalAsVariantDimCusPropMgrAsSldWorks.CustomPropertyManagerretval=Part.GetConfigura

5、tionNames()SetCusPropMgr=Part.Extension.CustomPropertyManager(retval(UBound(retval)))DimaddstatusAsLongaddstatus=CusPropMgr.Add2("图号A",swCustomInfoText,"AB-150-008")addstatus=CusPropMgr.Add2("MaterialA",swCustomInfoText,Chr(34)+"SW-Material@零件1.SLDPRT"+

6、Chr(34))addstatus=CusPropMgr.Add2("WeightA",swCustomInfoText,Chr(34)+"SW-Mass@零件1.SLDPRT"+Chr(34))addstatus=CusPropMgr.Add2("日期A",swCustomInfoDate,"2011-08-15")参数设置SW二次开发VB讲座二.配置特定参数三.摘要参数*摘要参数参数设置SW二次开发VB讲座*摘要参数SetswApp=Application.SldWorksSetPart=swAp

7、p.ActiveDocPart.SummaryInfo(SwConst.swSumInfoAuthor)="AAAA"Part.SummaryInfo(SwConst.swSumInfoKeywords)="BBBB"Part.SummaryInfo(SwConst.swSumInfoComment)="CCCC"Part.SummaryInfo(SwConst.swSumInfoTitle)="DDDD"Part.SummaryInfo(SwConst.swSumInfoSubject)="EEEE

8、“该信息的编辑处理:修改是在该项上重新输入删除只能再次输入=""获取则为=Part.SummaryInfo(SwConst.swSumInfoKeywords)参数设置SW二次开发VB讲座三.摘要参数谢谢!*参数设置SW二次开发VB讲座

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。