C# 클래스 ExtensibleStorageManager.StorageCommand

A static class that issues sample commands to a SchemaWrapper to demonstrate schema and data storage.
파일 보기 프로젝트 열기: AMEE/revit 1 사용 예제들

공개 메소드들

메소드 설명
CreateSetAndExport ( Element storageElement, string xmlPathOut, System.Guid schemaId, AccessLevel readAccess, AccessLevel writeAccess, string vendorId, string applicationId, string name, string documentation, SampleSchemaComplexity schemaComplexity ) : SchemaWrapperTools.SchemaWrapper

Creates a new sample Schema, creates an instance of that Schema (an Entity) in the given element, sets data on that element's entity, and exports the schema to a given XML file.

CreateWrapperFromSchema ( System.Guid schemaId, SchemaWrapperTools &schemaWrapper ) : void

Given an Autodesk.Revit.DB.ExtensibleStorage.Schema that already exists, create a SchemaWrapper containing that Schema's data.

EditExistingData ( Element storageElement, System.Guid schemaId, SchemaWrapperTools &schemaWrapper ) : void

Create a SchemaWrapper from a Schema Guid and try to find an Entity of a matching Guid in a given Element. If successfull, try to change the data in that Entity.

ImportSchemaFromXml ( string path, SchemaWrapperTools &sWrapper ) : void

Given an xml path containing serialized schema data, create a new Schema and SchemaWrapper

LookupAndExtractData ( Element storageElement, System.Guid schemaId, SchemaWrapperTools &schemaWrapper ) : void

Given an element, try to find an entity containing instance data from a given Schema Guid.

NewGuid ( ) : System.Guid

Create a new pseudorandom Guid

비공개 메소드들

메소드 설명
ComplexSchemaAndData ( SchemaWrapperTools mySchemaWrapper, Element storageElement, string xmlPathOut, System.Guid schemaId, AccessLevel readAccess, AccessLevel writeAccess, string vendorId, string applicationId, string name, string documentation, System.Entity &storageElementEntityWrite ) : void

Adds a simple fields, arrays, maps, subEntities, and arrays and maps of subEntities to a SchemaWrapper and Entity

SimpleSchemaAndData ( SchemaWrapperTools mySchemaWrapper, System.Entity &storageElementEntityWrite ) : void

Adds several small, simple fields to a SchemaWrapper and Entity

메소드 상세

CreateSetAndExport() 공개 정적인 메소드

Creates a new sample Schema, creates an instance of that Schema (an Entity) in the given element, sets data on that element's entity, and exports the schema to a given XML file.
public static CreateSetAndExport ( Element storageElement, string xmlPathOut, System.Guid schemaId, AccessLevel readAccess, AccessLevel writeAccess, string vendorId, string applicationId, string name, string documentation, SampleSchemaComplexity schemaComplexity ) : SchemaWrapperTools.SchemaWrapper
storageElement Element
xmlPathOut string
schemaId System.Guid
readAccess AccessLevel
writeAccess AccessLevel
vendorId string
applicationId string
name string
documentation string
schemaComplexity SampleSchemaComplexity
리턴 SchemaWrapperTools.SchemaWrapper

CreateWrapperFromSchema() 공개 정적인 메소드

Given an Autodesk.Revit.DB.ExtensibleStorage.Schema that already exists, create a SchemaWrapper containing that Schema's data.
public static CreateWrapperFromSchema ( System.Guid schemaId, SchemaWrapperTools &schemaWrapper ) : void
schemaId System.Guid The Guid of the existing Schema
schemaWrapper SchemaWrapperTools
리턴 void

EditExistingData() 공개 정적인 메소드

Create a SchemaWrapper from a Schema Guid and try to find an Entity of a matching Guid in a given Element. If successfull, try to change the data in that Entity.
public static EditExistingData ( Element storageElement, System.Guid schemaId, SchemaWrapperTools &schemaWrapper ) : void
storageElement Element
schemaId System.Guid
schemaWrapper SchemaWrapperTools
리턴 void

ImportSchemaFromXml() 공개 정적인 메소드

Given an xml path containing serialized schema data, create a new Schema and SchemaWrapper
public static ImportSchemaFromXml ( string path, SchemaWrapperTools &sWrapper ) : void
path string
sWrapper SchemaWrapperTools
리턴 void

LookupAndExtractData() 공개 정적인 메소드

Given an element, try to find an entity containing instance data from a given Schema Guid.
public static LookupAndExtractData ( Element storageElement, System.Guid schemaId, SchemaWrapperTools &schemaWrapper ) : void
storageElement Element The element to query
schemaId System.Guid The id of the Schema to query
schemaWrapper SchemaWrapperTools
리턴 void

NewGuid() 공개 정적인 메소드

Create a new pseudorandom Guid
public static NewGuid ( ) : System.Guid
리턴 System.Guid