理解装配中的文件引用-2

本文接着上一篇 【理解装配中的文件引用-1http://blog.youkuaiyun.com/autodeskinventorapi/article/details/8505452。 

原文链接:http://modthemachine.typepad.com/my_weblog/2008/11/file-references-part-2.html

I received a question related to my last posting that I thought was good and also helps to illustrate the previous posting.  The question that came in asked about the new Open Drawing command that is part of the subscription pack.  When you have a part, assembly, or presentation document open and right-click on the top node in the browser you'll see the new Open Drawing command in the context menu, as shown below.

Inventor中的零件或装配右键菜单有一个功能叫做【Open Drawing】,中文是【打开工程图】。很早前是在为速博用户提供的,现在已经是产品正式的部分。它可以打开引用了该文档的工程图。


Based on the last posting, the obvious question is how can this work since we learned that the part doesn't know which documents it's referenced in.  Is there something I wasn't telling you?  The answer is that nothing has changed from the last posting and everything I explained there still applies.  But then how can this command work?  It's actually quite simple how the command works and could have easily been implemented as a small add-in command.

其实在上一篇我们也提到,例如零件,它并不知道谁引用了自己。而上面Inventor提供的功能是怎么回事呢?其实它的原理非常简单。

When you run the Open Drawing command it looks in the current directory and subdirectories for a file that has the same name as the active document, but with a .idw or .dwg file extension.  If it doesn't find the file in the current directory or subdirectory it will search the other directories defined by the active project.  If it still doesn't find the file then it displays the Open dialog to allow you to specify the file.  The part doesn't have any knowledge of the drawing, it's only the program logic that's making that association based on the filename of the part.

当你运行【打开工程图】时,它在工程项目的文件夹或子文件夹找寻和当前文档(例如零件)同名但是后缀为.idw 或 .dwg的文件。如果没找到,则去项目制定的其它路径寻找。如果还是没找到,则弹出一个对话框让你指定。其实,当前文档根本不知道谁引用了它,而仅仅基于同文件名来进行查找。

There was also a related question in the customization newsgroup that I thought was answered in the previous posting but I think probably needs to be emphasized.  The concept to understand is that a reference to another document is just the filename, i.e. MyPart.ipt, NOT the full filename, C:\Temp\MyPart.ipt.  When Inventor opens an assembly it reads the file reference list and looks for the referenced files on disk.  It does this using the file name and the active project to define the possible locations of the file.  The location is not part of the file reference.  The important thing to get from this is that if you need to reorganize your files and move them around on disk you don't need to do anything about the file references.  You only need to make sure that the project specifies the directories that contain the files.  The only time you need to change file references is when you've changed the filename of the file. 

强调一下。这里做判断的标准基于文件名,而不是文件全名(包括后缀或路径)。 当Inventor打开装配,它将在磁盘上寻找引用的文件。也是基于文件名。路径并不是引用的一部分。所以,如果你把含有零件和装配的文件夹整体拷贝到另外的位置,你不需要担心是否引用的文件能被找到。只需要确保工程项目规定的那些文件夹里有这样名字的零件即可。


随着信息技术在管理上越来越深入而广泛的应用,作为学校以及一些培训机构,都在用信息化战术来部署线上学习以及线上考试,可以与线下的考试有机的结合在一起,实现基于SSM的小码创客教育教学资源库的设计与实现在技术上已成熟。本文介绍了基于SSM的小码创客教育教学资源库的设计与实现的开发全过程。通过分析企业对于基于SSM的小码创客教育教学资源库的设计与实现的需求,创建了一个计算机管理基于SSM的小码创客教育教学资源库的设计与实现的方案。文章介绍了基于SSM的小码创客教育教学资源库的设计与实现的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。 本基于SSM的小码创客教育教学资源库的设计与实现有管理员,校长,教师,学员四个角色。管理员可以管理校长,教师,学员等基本信息,校长角色除了校长管理之外,其他管理员可以操作的校长角色都可以操作。教师可以发布论坛,课件,视频,作业,学员可以查看和下载所有发布的信息,还可以上传作业。因而具有一定的实用性。 本站是一个B/S模式系统,采用Java的SSM框架作为开发技术,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得基于SSM的小码创客教育教学资源库的设计与实现管理工作系统化、规范化。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值