zoukankan      html  css  js  c++  java
  • 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);
    }
  • 相关阅读:
    linux 查看系统负载:uptime
    centos who命令 查看当前登录系统用户信息
    centos7 管理开机启动:systemd
    Linux ethtool 命令
    Linux ifconfig 命令
    linux centos7 目录
    POJ 1169
    POJ 1163
    POJ 1154
    POJ 1149
  • 原文地址:https://www.cnblogs.com/xpvincent/p/4172700.html
Copyright © 2011-2022 走看看