几何尺寸与公差论坛------致力于产品几何量公差标准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-13, 09:19 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】bom hyperlink

bom hyperlink
a while back i made a few posts asking about this, and have since written a work around. this is some stripped-down code from one of my projects, but i do believe it should function correctly.
should look through a given row and column for part numbers, and then reference a network drive to look for a matching file. if the a file is found then a hyperlink is added over the cell.
i know a few other people thought it would be a good idea, so i figured i could share what i had. it will likely need a deal of modification to suit your needs, but the basics are in place anyway.
note: this does not currently handle split bom's.
edited: 09/18/2008 at 11:32 am by blake dahle
thats quite a good idea blake; if people want this functionality i can make a little program to do this. post here if you would like such a tool.
hi blake,
after running the macro i couldn't able to see any change in my drawing.
do i need to do something else after running the macro.
you will need to modify the code so that it is specific to your needs. this is the basic code needed to traverse the bom and then place a hyperlinked annotation in a given cell.
it searches a given directory for a file using the part number from each cell of the bom. make sure the directory & sub-directory you are searching are updated to your needs. also check the filename formatting.
this macro is not really meant to be complete as-is, but shouldn't take too much to update it.
hi,
thanks, for your early reply.
i modified the file path to my drive,
apart from this are there anything i need to modify.
if so pls resend the macro by adding comment line where i need to modify to my requirement.
thanks,
added a few more comment lines showing you what needs to be modified.
basically the root directory, sub-directory structure (can be removed), filename formatting, and then the hyperlink destination.
thanks for sending the macro.
can you capture the image of a sample pdf for better understanding.
here is a screen shot of a pdf after running the macro. as you can see, when i mouse over item 3 in the bom, there is a hyperlink in the part number cell.
the macro also placed an asterisk in the cell to show that it has a seperate sheet.
if you are running the macro and its not placing a link, then it means its not finding any files matching the given part numbers in the directory you are telling it to search.
click for full image
sorry for disturbing too much on this...
i am finding hard in getting this macro to work in my facility.
i am resending the macro so make changes so that i can use it.
i have my drawing and the pdf files of the entire assembly in the h:\demo
thanks for the continous support.
thanks.
please provide an example of how your files are named.
for example, is this the way you are setup?
bom part number: 1234
pdf to link to: h:\demo\1234.pdf
yes absolutely.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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



所有的时间均为北京时间。 现在的时间是 09:06 AM.


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