How to retrieve instance parameters from an uninstantiated (uninserted) family
The trick to be able to read the default values for instance parameters is to get to the FamilyManager.
The family manager is a whole separate area of the API, with separate classes for FamilyType and FamilyParameter. You can think of it as the API version of the Family Types dialog in the Family Editor.
Getting there involves opening the family as a document, something along the lines of:
if (ColFam.IsEditable)
{
Document familyDoc = mainDocument.EditFamily( ColFam );
FamilyManager manager = familyDoc.FamilyManager; foreach (FamilyParameter fp in manager.Parameters )
{
// over simplified, but hopefully you get the idea....
if (fp.IsInstance)
{
string instanceValue = manager.CurrentType.AsString( fp );
}
} // don't forget to close the family when you're done.
familyDoc.Close(false);
}
How to retrieve instance parameters from an uninstantiated (uninserted) family的更多相关文章
- EF 接收OUTPUT参数的方法 How to Retrieve Stored Procedure Output Parameters in Entity Framework
原文地址:http://blogs.microsoft.co.il/gilf/2010/05/09/how-to-retrieve-stored-procedure-output-parameters ...
- Servers
Servers¶ Server interface. class novaclient.v1_1.servers.Server(manager, info, loaded=False) Bases: ...
- Expression Tree Basics 表达式树原理
variable point to code variable expression tree data structure lamda expression anonymous function 原 ...
- Using Stored Programs with MySQLdb
http://flylib.com/books/en/1.142.1.125/1/ Using Stored Programs with MySQLdb The techniques for call ...
- PHP Redis 全部操作方法
Classes and methods Usage Class Redis Class RedisException Predefined constants Class Redis Descript ...
- The template engine
Play has an efficient templating system which allows to dynamically generate HTML, XML, JSON or any ...
- python 调用mysql存储过程返回结果集
存储过程: delimiter | ),)) begin select * from tb_test where mid = imid and user = iuser; end; | delimit ...
- oracle 之数据字典屣履造门。
oracle 之数据字典屣履造门.(更新中) 今天是2013-06-20,哎,写这篇笔记的时候,我发现我是一个非常懒惰的人,这篇文章本该昨天就完成的,想起了钱鹤滩的<明日歌> ...
- scrapy入门与进阶
Scrapy是用纯Python实现一个为了爬取网站数据.提取结构性数据而编写的应用框架,用途非常广泛. 框架的力量,用户只需要定制开发几个模块就可以轻松的实现一个爬虫,用来抓取网页内容以及各种图片,非 ...
随机推荐
- 统计 F-test 和 T-test
1 显著性差异 如果样本足够大,很容易有显著性差异.样本小,要有显著性差异很难. y是因变量,x是自变量 2 F-test与T-test Ftest也称ANOVA,是用来检测一个y下的不同level的 ...
- 关于 UICollectionViewCell 的一些陷阱
如果直接使用 UICollectionViewCell 的自带属性 selected 来自定义一些样式,如: - (void)setSelected:(BOOL)selected { [super s ...
- NYOJ题目806HEIHEI的心情
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtMAAANRCAIAAACumacBAAAgAElEQVR4nOzdrXLrOrjG8XMT5b2Q4l
- 红外解码编码学习----verilog
在设计中运用红外遥控器可以很好的解决按键缺少的问题,还可以方便的控制产品. 红外发射部分: 红外发射管: 判断红外发射管的好坏 : 电路原理图: 接收部分: 传输的NEC协议: 本实验电路: veri ...
- poj 3349:Snowflake Snow Snowflakes(哈希查找,求和取余法+拉链法)
Snowflake Snow Snowflakes Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 30529 Accep ...
- RAC NTP/CTSS
本文總結主要參考: http://blog.itpub.net/23135684/viewspace-759693/ http://www.happyworld.net.cn/post/6.html ...
- PowerDesigner连接Oracle数据库生成数据模型【本地连接方式】
步骤1:选择数据库 步骤2:选择要连接的数据库的版本 步骤3:新建数据库连接 步骤4:提供3种连接数据库方式(在此选择第3种),并且点击配置按钮,进行下一步 步骤5:点击此按钮,填 ...
- wp8 入门到精通 数据库更新字段(一)
public class UserInfoDB : BaseDB { public UserInfoDB() : base(@"Data Source=isostore:\MakeLove\ ...
- PHP判断当前访问的是 微信、iphone、android 浏览器
<?phpvar ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i)=="micromess ...
- Intellij Idea 使用
一.使用前需要修改的配置: 1.当类实现Serializable接口时,自动生成 serialVersionUID 1)Setting->Inspections->java->Ser ...