Files
RevitSdkSamples/snapshot/2008/SDK/Samples/MaterialProperties/VB.NET/ReadMe_MaterialProperties.rtf
T

55 lines
31 KiB
Plaintext
Raw Normal View History

2024-12-12 09:51:40 +01:00
ÐÏࡱá>þÿ 9;þÿÿÿ8ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì¥Á#` ðR¿1bjbj\.\. .&>D>D1 ÿÿÿÿÿÿ¤~~~~~~~4NI"ønnnnnnnnÈ!Ê!Ê!Ê!Ê!Ê!Ê!$A$h©&î!~nnnnnî!~~nn",,,nv~n~nÈ!,nÈ!,,ª~~ì nb àƒŽ¨K#Çä
 È!"0I"& ÆÁ'î4Á'$ì Á'~ì Ünn,nnnnnî!î!"
nnnI"nnnnäv
¤v
~~~~~~ÿÿÿÿ Application: MaterialProperties
Revit product and version: All
Last Modified: 12/12/2006
Modified By: JL Autodesk HSL
Programming Language: VB.NET
Subject: This sample demonstrates how to get the material physical properties of a selected beam, column or brace, how to change the material type of the selected beam and how to change the unit weight of a selected beam, column or brace.
Classes:
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Elements.FamilyInstance
Autodesk.Revit.Parameter
Autodesk.Revit.Elements.Material
Project Files:
MaterialProperties.vb
This file contains the main functionalities that how to get the material physical properties of a selected beam, column or brace, how to change the material type of the selected beam and how to change the unit weight of a selected beam, column or brace. It also implements the IExternalCommand interface.
Description:
Functionalities:
With the selected beam, column or brace the material physical properties of that object should be displayed in a dialog.
Present all material types and their sub types to the user and then change the material type of the selected beam to the one chosen by the user.
With a selected concrete beam, column or brace change its unit weight to 145 P/ft3. Warn that this will change all instances of the elements that use this material.
Columns, Beams and Braces are represented as FamilyInstance objects within the Revit database.
Implementations:
The material element can be retrieved from a Family Instance object using the parameter named “Column Material”. This can be accessed in the manner shown in the sample code named Physical Prop. Other types of family instance will have a different name for this parameter which can be found using the Element Properties dialog.
All the available materials can be found by iterating through the document elements.
The Material Type can be retrieved by using the PHY_MATERIAL_PARAM_TYPE BuildInParameter.
Choices for a material type can be found by comparing all the Materials material type with the desired material type.
Material changes can be applied back to the element by using the “Column Material” property or similar property for other types mentioned above.
Physical properties of the material can be retrieved from the Material using various parameters.
The unit weight can be found from the Material by using the PHY_MATERIAL_PARAM_UNIT_WEIGHT BuildInParameter.
Instructions:
Open a Revit document, and then draw some beams, structure columns or braces.
Select a beam, a column or a brace; Load and run the MaterialProperties.dll.
Select a material type and sub material type, click the “Apply” button, then the selected beam, column or braces material type will be changed.
With a selected concrete beam, column or brace change its unit weight to 145 P/ft3 by clicking the “Change Unit Weight” button.
 
 :;>?MNTXYefhiuvñäѽñä­äñ䜉pñä\œ\Eñ-héo+hhZöB*OJPJQJ^JnHphÿtH'h{/VhhZöOJPJQJ^JnHo(tH0hÿ/,hhZöB*OJPJQJ^JnHo(phÿtH$h{/VhhZöOJPJQJ^JnHtH!hhZöOJPJQJ^JnHo(tHhhZöOJ

!
7
h i v  8
úúúúúúúúúïïïïúúúäúúúÜÜÜÔ
& Fgd™-Ø
& Fgd™-Ø
„hVD^„hgd:¨
„hWD´`„hgd™-ØgdhZö1þŒž£ªÂ " Ÿ   ® ¯ ¾ Ç Õ Ö å îÚÊÚ½¯œÚŒ{ÚjÊjW¯½œÊœÚœÚjÚD$h™-ØhhZöOJPJQJ^JnHtH$hhZö5OJPJQJ^JnHo(tH!hhZöOJPJQJ^JnHo(tH!h ºOJPJQJ^JnHo(tHh ºOJPJQJ^JnHtH$h{/VhhZöOJPJQJ^JnHtHhW3„hhZö5OJQJ^JhW3„hhZöOJQJ^JhhZöOJPJQJ^JnHtH'h{/VhhZöOJPJQJ^JnHo(tH!hW3„hhZöB*OJQJ^Jphÿå î þ