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实现一个为了爬取网站数据.提取结构性数据而编写的应用框架,用途非常广泛. 框架的力量,用户只需要定制开发几个模块就可以轻松的实现一个爬虫,用来抓取网页内容以及各种图片,非 ...
随机推荐
- 躲避大龙(codevs 1961)
题目描述 Description 你早上起来,慢悠悠地来到学校门口,发现已经是八点整了!(这句话里有一个比较重要的条件) 学校共有N个地点,编号为1~N,其中1号为学校门口(也就是你现在所处的位置), ...
- Swing开发之JComboBox篇
http://blog.csdn.net/sjf0115/article/details/6991579
- javaWeb---文件上传(commons-FileUpload组件)
FileUpload是Apache组织(www.apache.org)提供的免费的上传组件,但是FileUpload组件本身还依赖于commons组件,所以从Apache下载此组件的时候还需要连同co ...
- JUnit笔记
- PHP面向对象——异常处理
Error_reporting(0); //在网站正式上线的时候不准他报任何错误. 错误级别为不允许报错 Exception 是所有异常的基类. 测试并捕捉一个错误的例子: class mysq ...
- php 用户登录验证
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- Delphi之DLL知识学习2---静态链接和动态链接
静态连接 静态链接是指Delphi 编译器把要调用的函数和过程编译成可执行代码.函数的代码可存留在应用程序的 .dpr文件或一单元中.当链接用户的应用程序时,这些函数与过程便成为最终的可执行文件的一部 ...
- java中文乱码解决方法汇总
public static void main(String[] argv){ try { System.out.println(“中文”);//1 ...
- ASP.NET 5中的ASP.NET Bundles跑到哪里去了?
(此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 众所周知,在ASP.NET MVC中很早就存在一个所谓的"bundling and ...
- 用PowerShell脚本删除SharePoint 的 Page中的WebPart
编写PowerShell脚本可以删除page中所有的webpart,也可以根据webpart的属性信息去删除特定的webpart. 下面的PowerShell脚本便是删除对应page中所有的webpa ...