C# Class Revit.SDK.Samples.PathReinforcement.CS.BartypeConverter

Converter between Autodesk.Revit.DB.ElementId and Element's name
Inheritance: System.ComponentModel.TypeConverter
Datei anzeigen Open project: AMEE/revit

Protected Properties

Property Type Description
m_hash System.Collections.Hashtable

Public Methods

Method Description
BartypeConverter ( ) : System

initialize m_hash

CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

whether conversion is allowed

ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object v ) : object

convert from Name to ElementId

ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object v, Type destinationType ) : object

convert from Autodesk.Revit.DB.ElementId to Name

GetConvertHash ( ) : void

fill hash table

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection

provide Autodesk.Revit.DB.ElementId collection

GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool

always return true so that user can't input unexpected text

GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool

Get supported standard value

Method Details

BartypeConverter() public method

initialize m_hash
public BartypeConverter ( ) : System
return System

CanConvertFrom() public method

whether conversion is allowed
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
return bool

ConvertFrom() public method

convert from Name to ElementId
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object v ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
v object Name
return object

ConvertTo() public method

convert from Autodesk.Revit.DB.ElementId to Name
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object v, Type destinationType ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
v object ElementId
destinationType System.Type String
return object

GetConvertHash() public method

fill hash table
public GetConvertHash ( ) : void
return void

GetStandardValues() public method

provide Autodesk.Revit.DB.ElementId collection
public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
return StandardValuesCollection

GetStandardValuesExclusive() public method

always return true so that user can't input unexpected text
public GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
return bool

GetStandardValuesSupported() public method

Get supported standard value
public GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
return bool

Property Details

m_hash protected_oe property

hash table
protected Hashtable,System.Collections m_hash
return System.Collections.Hashtable