几何尺寸与公差论坛

 找回密码
 注册
查看: 628|回复: 0

【转帖】bom hyperlink

[复制链接]
发表于 2009-4-13 09:19:05 | 显示全部楼层 |阅读模式
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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-24 03:14 , Processed in 0.035013 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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