理解对象模型图(OMD).ppt

理解对象模型图(OMD).ppt

ID:52329658

大小:923.01 KB

页数:17页

时间:2020-04-04

理解对象模型图(OMD).ppt_第1页
理解对象模型图(OMD).ppt_第2页
理解对象模型图(OMD).ppt_第3页
理解对象模型图(OMD).ppt_第4页
理解对象模型图(OMD).ppt_第5页
资源描述:

《理解对象模型图(OMD).ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、AO/AE编程基础(1)1.2理解对象模型图(OMD)LessonoverviewArcObject的对象模型图阅读一个对象的模型图类的类型类的相互关系接口、属性、方法的图标根据OMD图表编写程序2OMDshelpyouwritecodeShowinterfaces,methods,andpropertiesforeachclassShowrelationshipsbetweenclasses在几个图表中拥有超过1,500个类超过1,600个接口ArcObjectobjectmodeldiagrams3在哪里可以找到ArcGISOMD图表Start

2、>Programs>ArcGIS>ArcObjectsDeveloperHelp简单的、详细的类图PDFfiles电子书籍光盘中软件安装的目录中4Relationshipsymbols继承组成用来创建对应关系1:N联合*_____蛋鸟翅膀羽毛2AbstractClassClassClass小鸡CoClass巢CoClass*5类和他们相应的对象ArcMapobjectsMxDocumentMapLayer**FeatureLayerApplication6NotcreatableorinstantiableCanneverhaveinstances

3、ofanabstractclassDefinegeneralinterfacesforsubclassesSubclassesinheritinterfacesOMDsymbol:2Dshadedrectangle抽象类(没有阴影)7实例化类(Class)NoncreatableclassCannotcreatewiththeNewkeywordObtaininstancesfromotherobjectsOMDSymbol:3DRectanglewithnoshadeDimpNewRowAsIRowSetpNewRow=pTable.Create

4、Row生成8Creatable:UsetheNewkeywordDimpMapAsIMapSetpMap=NewMapInstantiable:ObtainfromotherobjectsDimpMapAsIMapSetpMap=pMxDocument.FocusMapOMDsymbol:Shaded3Drectangle可创建的类(CoClass)9Wheretobegin?GettingintotheOMD特殊的全局变量Application:IApplicationinterfaceoftheApplicationobjectThisDocu

5、ment:IDocumentinterfaceoftheMxDocumentobject阅读ArcMap或ArcCatalogOMD图表的入口ApplicationThisDocument10PropertyandmethodsymbolsProperty哑铃形状的图标MethodPropertyGet(read)PropertySet(write)11PropertyPut:MostArcObjectspropertiesPropertyholdsavalueoracopyofanobjectDonotuseSetkeywordPropertyP

6、utbyReference:SomeArcObjectspropertiesPropertyholdsareferencetoanobjectMustusetheSetkeyword如果引用对象发生了变化,对象的属性将同步受到影像SettingpropertiespLayer.Name="PortMoresby"'NoSetkeywordSetpLayer.FeatureClass=pMoresbyData'MustuseSet!12ReturnavalueName:StringReturnanobjectreferenceDocument:IDo

7、cumentStatusBar:IStatusBarGettingproperties返回一个值DimstrNameAsStringDimpDocAsIDocumentDimpBarAsIStatusBarstrName=Application.NameMsgBoxstrName返回一个引用SetpDoc=Application.DocumentSetpBar=Application.StatusBarpBar.Message(0)pDoc.Title13棒棒糖类型的图标()Findinginterfaces这些接口也是有效的。但是详细的属性和方法

8、必须在其它地方浏览。(e.g.,ObjectBrowser).该接口被本类使用.所有的属性和放都列表在类图中.继承接口是有

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。