Getting the "Sample Size" of a texture

Getting the "Sample Size" of a texture

Anonymous
Not applicable
455 Views
1 Reply
Message 1 of 2

Getting the "Sample Size" of a texture

Anonymous
Not applicable
Hello,

Hello, I'm developing plugin for Revit Architecture 2009/2010 and i need to get/set (set is not very important, get is!) the "sample size" parameter from a material. I have doubts that its possible, because you even cant get the textures from most of the materials...

Is it possible the get the sample size from a texture? If so, how?

Any help is appreciated, even if its just a "no".

Regards
0 Likes
456 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Run this experiment and you will find that there is a list of properties that you can manipulate related to the render apperance. You should be able to construct your desired code after that.

Public Function Execute(ByVal commandData As Autodesk.Revit.ExternalCommandData, ByRef message As String, ByVal elements As Autodesk.Revit.ElementSet) As Autodesk.Revit.IExternalCommand.Result Implements Autodesk.Revit.IExternalCommand.Execute
Dim doc As Autodesk.Revit.Document = commandData.Application.ActiveDocument
Dim sel As Autodesk.Revit.Selection = doc.Selection
For Each e As Autodesk.Revit.Element In doc.Selection.Elements
Dim symbol As Symbols.FamilySymbol = e.ObjectType
For Each mat As Elements.Material In symbol.Materials
Dim asset As Autodesk.Revit.Utility.Asset = mat.RenderAppearance
For I As Integer = 0 To asset.Size - 1
Dim prop As Autodesk.Revit.Utility.AssetProperty = asset(I)
Debug.Print(prop.Name & " : " & prop.Type.ToString)
Next
Next
Next
End Function

jvj

Edited by: JamieVJohnson on Feb 15, 2010 2:44 AM
0 Likes