Revit开发之参数详解
来源:互联网 发布:linux的基本操作 编辑:程序博客网 时间:2024/05/02 04:56
在Revit里所有的参数值可以分为5中类型:
NoneNone represents an invalid storage type. This value should not be used.IntegerThe internal data is stored in the form of a signed 32 bit integer.DoubleThe data will be stored internally in the form of an 8 byte floating point number.StringThe internal data will be stored in the form of a string of characters.ElementIdThe data type represents an element and is stored as the id of the element.每个Paramter的参数值类型可以通过Parameter.StorageType来判断
StorageType是一个枚举包含了上面5中参数值类型,
对于StorageType为StorageType.None的参数,不能通过Parameter.Set()来设置,
也不能重Parameter直接获取到它的值。
对于Integer可以通过Parameter.AsInteger()来获取它们的值
对于Double可以通过Parameter.AsDouble()来获取他们的值,这个返回的是一个英尺单位的值,
还可以通过Parameter.AsValueString(),获取它对于的毫米单位值对应的String。
(比如有一个200.0,你通过AsDouble()得到的是200.0转换的英尺的值,而用AsValueString()得到一个为 “200.0“ 的string)
对于String可以通过Parameter.AsString()来获取他们的值
对于ElementId 可以通过Parameter.AsElementId()来获取他们的值
在Set值的时候
传入的参数一定要个Parameter的StorageType对应起来
博主会经常更新一些技术文章,请大家多多关注,多多交流
更多技术交流,请加qq群480950299
0 0
- Revit开发之参数详解
- Revit开发之共享参数
- Revit开发之参数的修改实例
- Revit 开发之全局参数GlobalParameter
- Revit开发参数读取
- Revit开发之判断参数是否为项目参数
- Revit开发之AddInCommandBinding
- Revit开发之PreviewControl
- Revit开发之IUpdater
- Revit开发之SelectionFilterElement
- Revit开发之ElementParameterFilter
- Revit开发之管段
- Revit开发编辑族参数
- Revit开发之元素过滤
- Revit开发之Element操作
- Revit开发过滤之FamilyInstanceFilter
- Revit开发之管道创建
- Revit开发之空闲事件
- sdk升级后和adt版本不一致的问题
- 数据从kafka到hive(2)
- Android PSI and index do not match
- 安装Bash on Windows(ubuntu on win10)
- mysql 联合索引详解
- Revit开发之参数详解
- Windows VPN设置笔记
- 内存、时间复杂度、CPU/GPU以及运行时间
- 数据从kafka到hive(1)
- 高斯混合模型
- 哈夫曼树学习笔记 Java实现
- cookie与session的区别
- 1
- opencv在ubuntu12.04下的安装