TR0140 Workspace Manager API Reference

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

TR0140(v1.5)May23,20081WorkspaceManagerAPIReferenceSummaryTechnicalReferenceTR0140(v1.5)May23,2008ThisreferenceprovidesaconcisereferenceoftheWorkspaceAPIaspartoftheAltiumDesignerRunTimeLibrary.TheWorkSpaceManagerApplicationProgrammingInterfacereferencecoverstheWorkspacemanagerobjectinterfacesfromtheWorkspaceManagerObjectModel.Theworkspacemanagerinterfacesexistaslongthereareassociatedexistingobjectsinmemory,thuswhenwritingascriptorservercode,youhavetheresponsibilityofcheckingwhethertheinterfaceyouwishtoqueryexistsornotbeforeyouproceedtoinvoketheinterface'smethods.Youwillhavetoensurethatthedesignprojectiscompiledfirstotherwisetheworkspacemanagerinterfacesareinaninvalidstateandwillbereturningnilvalues.Theworkspacemanagerprovidesabridgebetweensourcedocuments(suchasSchematicdocuments)anditscorrespondingprimaryimplementationdocuments(suchasPCBdocuments).Thisworkspacemanagerprovidesyouinformationonhowaprojectisstructured,andinformationonnetsanditsassociatednetawareobjectsofsourceandimplementationdocuments.TheIWorkSpaceinterfacedealswithprojects,documentsandobjectsontheopendocuments.Touseworkspaceinterfaces,theprojectneedstobecompiledfirstrefreshingallthelinkagesandnetsuptodate.MainWorkspaceManagerinterfaces•TheIDMObjectinterfaceisagenericinterfaceusedforallotherWorkSpaceinterfaces.•TheIWorkSpaceinterfaceisthetoplevelinterfaceandcontainsmanyinterfaceswithin.ForexampletheIWorkSpaceinterfacehasaDM_OpenProjectfunctionwhichreturnsacurrentlyopenorcurrentlyfocussedIProjectinterface.•TheIProjectinterfacerepresentsthecurrentprojectinAltiumDesigner.•TheIDocumentinterfacerepresentsadocumentinAltiumDesigner.LogicalandPhysicalDocumentsAnimportantnote,therearelogicalandphysicaldocuments;thesetermsareusedtodifferentiatethedocumentsinmulti-channelprojects.Amultichanneldesignmeansthatasinglesheetisreferencedrepeatedlyforachanneldesign.Thissheetiscalledalogicaldocument.Aphysicaldocument(usuallyaPCBdocument)hascomponentswithuniquenameswithinaroomwhichismappedtoachannelonaSchematicsheet.SoamultichanneldesigntranslatestomultipleroomswithcomponentswithuniquephysicaldesignatorsonaPCB.AphysicaldesignatorofaPCBcomponentiscalculatedtohavethehierarchypathofaschematicprojectaswellasthelogicaldesignatoroftheassociatedSchematiccomponenttoensurethatthisdesignatorforthePCBcomponentisunique.ExampleObtainingtheprojectpathfromthecurrentIProjectinterface.//GetWSMinterface(theshelloftheWorkSpaceManagerinterface).WSM:=GetWorkSpace;IfWSM=NilThenExit;Document:=WSM.DM_Document;IfDocument=NilTheExit;Project:=Document.DM_Project;ScriptExamplesTherearescriptexamplesinthe\Examples\Scripts\WSMfolderSeealsoWorkSpaceManagerAPIReference2TR0140(v1.5)May23,2008WorkSpaceManagerInterfaceOverviewWorkSpaceManagerInterfacesWorkSpaceManagerEnumeratedTypesWorkSpaceManagerFunctionsWorkspaceManagerObjectModelTohaveaccesstotheworkspaceinterfaceobjectwhichrepresentstheworkspacemanagerinAltiumDesigner,youneedtoinvoketheGetWorkspacefunctionfirst.ThisfunctionreturnsyoutheIWorkspaceinterfaceobject.Anobjectinterfaceisjustameansofaccesstoanobjectinmemory.Theworkspacemanagerprovidesabridgebetweensourcedocuments(suchasSchematicdocuments)anditscorrespondingprimaryimplementationdocuments(suchasPCBdocuments).ThisworkspacemanagerprovidesyoutheabilitytomanipulatethecontentsofadesignprojectinAltiumDesigner.AfewofWorkspacemanagerObjectInterfacesTheIDMObjectinterfaceisagenericinterfaceusedforallotherWorkSpaceinterfaces.TheIWorkSpaceinterfaceisthetoplevelinterfaceandcontainsmanyinterfaceswithin.ForexampletheIWorkSpaceinterfacehasaDM_OpenProjectfunctionwhichreturnsacurrentlyopenorcurrentlyfocussedIProjectinterface.TheIProjectinterfacerepresentsadesignprojectinAltiumDesigner.TheIPartinterfacerepresentsapartofamulti-partcomponent.ThiscomponentisrepresentedbytheIComponentinterface.TheIDocumentinterfacerepresentsadocumentinAltiumDesigner.TheIECOinterfaceisusedfortheEngineeringChangeOrdersysteminPCBandSchematicservers.TheINetinterfaceisacontainerstoringNetawareobjects(whichareINetIteminterfaces)thathavethesamenetproperty.SothereareINetinterfacesrepresentingnetsonadocument.TheINetIteminterfaceistheancestorinterfacefortheCross,Pin,Port,Netlabel,SheetentryandPowerObjectinterfaces.Theseinterfaceobjectshaveanetpropertyandthustheseobjectscanbepartofanet.DocumentinterfaceOverviewTheIDocumentinterfacerepresentstheexistingdocumentinAltiumDesigner.AdocumentcanbeaSchematic,PCB,VHDL,PCBLibrarydocumentetc.TheDM_DocumentKindmethodoftheIDocumentinterfacewheninvokedreturnsyouthedocumenttype.Adocumentcanbepartofaprojectorfreedocumentsproject.Anexistingdocumentcanbequeriedtoreturntheprojectinterfacethisdocumentisassociatedwith.NotesTheIDocumentinterfaceisastandaloneinterface.IDocumentmethodsDM_BusCountDM_BusesDM_ChannelClassCountDM_ChannelClassesDM_ChannelIndexDM_ChannelPrefixDM_ChannelRoomNamingStyleDM_ChildDocumentCountDM_ChildDocumentsDM_CompileDM_ComponentClassCountIDocumentpropertiesWorkSpaceManagerAPIReferenceTR0140(v1.5)May23,20083DM_ComponentClassesDM_ComponentCountDM_ComponentsDM_ConstraintGroupCountDM_Con

1 / 161
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功