欢迎来到天天文库
浏览记录
ID:56523272
大小:1.93 MB
页数:81页
时间:2020-06-27
《Inventor二次开发入门.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Inventor二次开发入门Inventor二次开发入门1课程1:开始接触InventorAPI,用VB.NET写一个最简单的插件,实现选择集的隐藏2课程2:帮助了解VisualStudio编程环境以及基本需要熟悉的方面12课程3:深入解释课程1里出现的InventorAPI相关代码,帮助了解相关对象25课程4:学习简单的带界面程序,了解其中的逻辑,以及如何操作选择集35课程5:操作对象的附着属性(Attributes)45课程6:基于前面课程,制作一个更加丰富的插件61课程7:深入学习的建议70课程1:开始接触InventorAPI,用VB.NET写一个最简单的插件,实现选择集的隐藏在本课
2、中,你将开始写一个使用AutodeskInventorAPI基于VB.NET隐藏所选组件的应用程序。演示视频(英文)演示代码lesson1_vb-net.zip(zip-49Kb)lesson1_c-sharp.zip(zip-73Kb)根据步骤来创建你的第一个插件1.LaunchtheVisualBasicExpressdevelopmentenvironment:OpenVisualBasic2010ExpressusingtheWindowsStartmenu,selectingAllPrograms,thenMicrosoftVisualStudio2010Express,andth
3、enMicrosoftVisualBasic2010Express.Note:YoucanalsouseVisualBasic2008Expresswiththisguide.Projectsforboth2010and2008areprovided.2.Openaclasslibraryproject:InsideVisualBasicExpress,ontheFilemenu,clickOpenProject.Navigatetothesubfolderofthesupportingmaterialyoudownloadedatthetopofthisguidecalledlesson1
4、_VisualExpress2010andopentheVB.NETprojectcontainedwithinitbyselectingtheprojectfileMyFirstInventorPlugin_Lesson1.vbproj.3.Openthecode:Intheopenprojectyouwillseeaformwithonebutton(ifyoudon’tseetheForm,clickonForm1.vbintheSolutionExplorerframeintheupperrighthandside).RightclickonForm1intheSolutionExp
5、lorerandselectViewCodeorjustdoubleclickontheForm.3.Addthecode:Inthecodewindow,typethecodebelowintotheSubButton1_Click.(Thisiswhatrunswhenthebuttonisclicked.) Youmayneedtoscrolldowntowardsthebottomofthecodetofindtheplacetoaddthebelowcode,lookingforthewords‘AddcodeforLesson1here’. Togetthefullexperie
6、nceofdevelopingwithVisualBasicExpress–includingtheuseoffeaturessuchasIntelliSense–werecommendyoutypethecodefromthisguideratherthancopyingandpastingit.Thatsaid,ifconstrainedfortimeyoucanalsocopyandpasteintotheVisualBasicExpresscodewindow,althoughthiswillreducetheexperienceyougainfromworkingwiththeco
7、dedirectly. If_invApp.Documents.Count=0Then MsgBox("NeedtoopenanAssemblydocument") ReturnEndIf If_invApp.ActiveDocument.DocumentType<>_DocumentTypeEnum.kAssemblyDocumentObjectThen MsgBox("NeedtohaveanAssem
此文档下载收益归作者所有