找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 12099|回复: 1
打印 上一主题 下一主题

[分享] 为了解决系列零件设计表问题,低配上网本能安装SW2006-SW2014

[复制链接]
跳转到指定楼层
1
发表于 2014-10-13 13:08:38 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
材料明细表插入到系列零件设计表时。遇到的问题是,材料明细的配置与特征的配置不能一对一进行关联。
找了段API小代码,问题也没有得到解决。

  1. Private Sub ListBox1_Click()
  2.   Dim SwFeat As Feature, SwBomFeat As BomFeature, Str
  3.     Str = "材料明细表1"
  4.     Set SwFeat = SwModel.FeatureByName(Str)
  5.     Set SwBomFeat = SwFeat.GetSpecificFeature
  6.   Dim S(0) As String, Visible
  7.   Dim sConfig As Configuration
  8.     With ListBox1
  9.       
  10.        Set sConfig = SwModel.GetConfigurationByName(.List(.ListIndex))
  11.        SwBomFeat.Configuration = sConfig.Name
  12.        S(0) = sConfig.Name  ''.List(.ListIndex - 1)
  13.        SwBomFeat.SetConfigurations True, Visible, S
  14.        Label1.Caption = S(0)
  15.     End With
  16. End Sub


  17. Private Sub ListBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
  18.   ''
  19.   Dim SwFeat As Feature, SwBomFeat As BomFeature, Str
  20.     Str = "材料明细表1"
  21.     Set SwFeat = SwModel.FeatureByName(Str)
  22.     Set SwBomFeat = SwFeat.GetSpecificFeature
  23.   Dim S(0) As String, Visible
  24.   Dim sConfig As Configuration
  25.     With ListBox1
  26.        Set sConfig = SwModel.GetConfigurationByName(.List(.ListIndex))
  27.        SwModel.ShowConfiguration sConfig.Name
  28.        S(0) = .List(.ListIndex - 1)
  29.        SwBomFeat.SetConfigurations True, Visible, S
  30.        Label1.Caption = S(0)
  31.     End With
  32. End Sub

  33. Private Sub UserForm_Initialize()
  34.     Set SwApp = Application.SldWorks
  35.     Set SwModel = SwApp.ActiveDoc
  36.   Dim ConfArr
  37.     ConfArr = SwModel.GetConfigurationNames
  38.     ''
  39.     With ListBox1
  40.         .List = ConfArr
  41.     End With
  42. End Sub
复制代码
没办法,只能安装不同版本的SW,问题还没有得到解决。
唯一的收获就是低配置的上网本,能安装多版本SW。





本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
发表于 2014-10-13 13:20:20 | 只看该作者
低配的上网本能安装多版本的solidworks,自己都不相信。
电脑型号宏碁 AO521 笔记本电脑
操作系统Windows 7 旗舰版 64位 SP1 ( DirectX 11 )
处理器AMD Athlon(速龙) II Neo K125
主板宏碁 JV01-NL (AMD 760G/780G/780V/785G/790GX/880G/890GX)
内存2 GB ( 三星 DDR3 1333MHz )
主硬盘西数 WDC WD1600BEVT-22A23T0 ( 160 GB / 5400 转/分 )
显卡ATI Mobility Radeon HD 4200  ( 336 MB / 宏碁 )
显示器LG LGD026E LP101WSB-TLN1 ( 10.1 英寸 )
声卡Conexant SmartAudio HD @
网卡鈺硕 AR8152 PCI-E Fast Ethernet Controller / 宏碁
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2025-2-23 02:26 , Processed in 0.021651 second(s), 12 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2025 www.iCAx.org

快速回复 返回顶部 返回列表