几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-04-12, 09:30 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】is it possible to edit custom properties with a script outside of sw

is it possible to edit custom properties with a script outside of sw?
i know you can manually edit custom property info outside of solidworks in windows explorer by right-clicking a file and going to the custom property tab. is there a way to batch change custom properties with a script outside of solidworks? i am using pack and go to add a suffix on all the parts of an model. i need to update the "item" custom property in each part to reflect the new filename name, which has the old item# plus the new suffix.
any suggestions?
cswp
solidworks office professional 2008, sp 3.1
pc #1:
dell precision t3400, core2duo 2.33ghz, 4gb ram,
nvidia quadro fx 1700
pc #2:
dell precision 380, p4 3.80ghz, 2gb ram,
nvidia quadro fx 1400
click for full image
yeah... you can use dsofile. it's a dll, i think you download it from microsoft. it comes w/ a sample application and code you can use to create your own.
eric
there is a product called "custom property propa-gator", .customsolids.com. it's not very expensive and quite powerful. just a word of caution: it can get you into trouble if you don't have all your ducks in a row.
good luck!
rio benson - "contract conceptual machine design"
sw user since '98, sw 2007 sp5 & sw 2009 sp1
amd athlon 64 x2 6000+ 3.01 ghz, 4gb ram
nvidia m2n32-sli mobo, nvidia fx-3500 graphics
dell 2407wfp-hc & dell 2007wfp lcds
windows xp sp2, check out .riobenson.com
you can do it from any api that uses vba.
matt lorono
solidworks 2007 sp3.1
cad engineer/ecn analyst
thanks for the replies. looks like dsofile may be what i need. i can grab some of the code from the sample project ms has and use it my project. i can have dsofile scan a folder and change the item custom property to match the filename.
@rio benson,
ive checked out propagator years ago. the problem with apps like that is they sometimes do to many things. i like to create my own apps that do a specific function.
cswp
solidworks office professional 2008, sp 3.1
pc #1:
dell precision t3400, core2duo 2.33ghz, 4gb ram,
nvidia quadro fx 1700
pc #2:
dell precision 380, p4 3.80ghz, 2gb ram,
nvidia quadro fx 1400
chris,
you can also use sw's own document manager. you can find example in api help.
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
batchprocess can do this for you if you do not want to create a program yourself.
originally posted by: luke malpass
batchprocess can do this for you if you do not want to create a program yourself.
originally posted by: chris m
what exactly is the search term to use in api help? i thought about using a assembly traversal and have it grab the filename of each model in the assembly, then set the "item" custom property as that value.
look in "contents tab>solidworks document manager api help>examples>visual basic (vb)>get and set custom property values"
you will need a document manager license key. look at "contents tab>solidworks document manager api help>getting started" for information about how to get it.
hope it helps
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
originally posted by: chris m
originally posted by: luke malpass
batchprocess can do this for you if you do not want to create a program yourself.
the program seems a bit sluggish on my system. i cant seem to find where it would automatically change the item# custom property to match the filename.
the new version now has the filename option in the custom property rules editor. if you right-click the value field you can select special fields, one is filename, which is just the filename, and the other is full filename, which is the entire location and filename.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】custom properties bom --- yang686526 SolidWorks二次开发 0 2009-04-12 08:36 PM
【转帖】setting custom properties yang686526 SolidWorks二次开发 0 2009-04-12 07:36 PM
【转帖】is it possible to edit custom properties with a script outside of sw yang686526 SolidWorks二次开发 0 2009-04-12 06:45 PM
【转帖】custom properties calls yang686526 SolidWorks二次开发 0 2009-04-12 05:56 PM


所有的时间均为北京时间。 现在的时间是 01:17 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多