This is Spiderinnet's Typepad Profile.
Join Typepad and start following Spiderinnet's activity
Join Now!
Already a member? Sign In
Spiderinnet
a spider crawling mainly in the .NET of Revit and Navisworks
Interests: crawling mainly in the .NET of Revit and Navisworks
Recent Activity
Based on our experiences in the past decades, it’s fun to play with Revit API. Here is one. The method FamDoc.FamilyManager.get_Parameter(name) does not care parameter name case sensitively, but Revit family UI does! So, we have to create our own version of the method such as FamDoc.GetFP(caseSensitiveName). Have fun! Continue reading
Based on our experiences in the past decades, it’s fun to play with Revit API. Here is one. The method FamDoc.FamilyManager.SetFormula(…) needs a transaction, otherwise: 'A sub-transaction can only be active inside an open Transaction.' But FamDoc.FamilyManager.AddParameter(…) does not! It should have started one inside itself. Continue reading
Based on our experiences in the past decades, it’s fun to play with Revit API. Here is one. Family parameter can be added to family without types through API; but its formula cannot be set! The method call FamDoc.FamilyManager.SetFormula(...) would throw out an exception. 'There is no valid family type.'... Continue reading
Revit Family Organizer 2020 (build #4.8.5.3) has been released. It works with Revit 2020, 2019, 2018 and 2017. A lot of tools (more than one hundred) have been added. They include but not limited to three more Family Creators, more than dozen Mass Creators, more than dozen Points Organizer tools,... Continue reading
Based on our experiences in the past decades, it’s fun to play with Revit API. Here is one. FamDoc.Save(), FamDoc.Close(), and FamDoc.Close(true) calls all need the FamDoc has a full path! It is easy to understand for the first and third call as they will be trying to look for... Continue reading
Based on our experiences in the past decades, it’s fun to play with Revit API. Here is one. Family's built-in parameter 'Family Name' returns nothing! It seems the parameter always behaves so now. Then please remove it! Continue reading
A new build of Revit Parameter Organizer 2020 has just been released. It still works with Revit 2020, 2019, 2018 and 2017. It behaves much more friendly, reliably and efficiently. Family Parameters Editor now supports really changing Parameter Groups. Value and Formula input have also been improved. Result report is... Continue reading
Based on our experiences in the past decades, it’s fun to play with Revit API. Here is one. FamDoc.OwnerFamily.Name returns null! FamDoc.OwnerFamily returns a valid object but the family has a null name! Enjoy! Continue reading
Revit Parameter Organizer 2020 has been released. It works with Revit 2020, 2019, 2018 and 2017. UIs are made more friendly. Performance are improved a lot. Almost all features are enhanced, e.g. Shared Parameter Loaders and Updaters, various Editors, Renamers, Replacers and Purgers, Transporters and Importers, element Inspectors, and so... Continue reading
Image
Last time, we talked about InternalDefinition.SetAllowVaryBetweenGroups(...) and especially about its Document argument. Wondered what it would be really about? Suggested doing an experiment about it. We finally got a moment and did an experiment. Here is the test code. var docs = CachedApp.Documents.ToList<Document>(); string info = string.Empty; Document doc1 =... Continue reading
Let's talk about the InternalDefinition.SetAllowVaryBetweenGroups() method one more time. The odd point is that it needs a document argument: public ICollection<ElementId> SetAllowVaryBetweenGroups( Document document, bool allowVaryBetweenGroups ) However, the VariesAcrossGroups property is not document indexed but returns the flag directly: public bool VariesAcrossGroups { get; } We also wonder how... Continue reading
InternalDefinition.SetAllowVaryBetweenGroups() method was talked about some time ago. Here let's talk about it again. InternalDefinition class has a read-only property to access its so called AllowVaryBetweenGroups inside flag, however also provides the SetAllowVaryBetweenGroups() method trying to change the flag from outside. public bool VariesAcrossGroups { get; } Besides naming inconsistencies... Continue reading
SharedParameterApplicableRule class has a single constructor: public SharedParameterApplicableRule( string parameterName ) As can be seen, it accepts a parameter name as argument. Oh, no! It will cause confusions since shared parameters are allowed to have duplicate names by Revit. If we'd like to find elements with name ABC as shared... Continue reading
It is good that LabelUtils.GetLabelFor() can get localized labels for enum values of quite a few API types such as ParameterType, UnitType, BuiltInParameter, and BuiltInParameterGroup. Very nice! In version 2020, BuiltInCategory enum values can also be got their labels by the method. And, BuiltInParameter enum values can be got labels... Continue reading
This topic has been talked about a few times already. The following is such a pretty old post. Parameter of Revit API – 32: Erase Project Parameter Since the post and its code snippets are very old, most likely addressing Revit 2010/2011 at that time, the solution as suggested there... Continue reading
Revit .NET API Element class provides quite some different methods/properties to get parameter(s) from its instance. Here they are: LookupParameter(String) GetParameters(String) get_Parameter(Guid) get_Parameter(BuiltInParameter) get_Parameter(Definition) The last three are indexed properties actually and can be used to retrieve the exact parameter of concern, shared, built-in or any with a certain definition... Continue reading
Revit .NET Element has quite some methods and properties having something to do with the most important parameter stuffs. Element.GetOrderedParameters() Method vs. Element.Parameters Property are two most important ones, as titled. Here is the description about the Element.GetOrderedParameters() Method in the help file. "The collection consists of only visible parameters... Continue reading
Revit .NET API provides quite some classes and methods to filter elements and parameters. FilterRule, ElementParameterFilter and FilteredElementCollector.WherePasses() are among those pretty important ones. In the previous post, some general idea was provided about how to find elements with a particular built-in parameter no matter what value it may have... Continue reading
Revit .NET API provides quite some classes and methods to filter elements and parameters. FilterRule, ElementParameterFilter and FilteredElementCollector.WherePasses() are among those pretty important ones. They can be used to filter out some elements from a document with some parameter criteria such as name and value, e.g. wall length is greater... Continue reading
Revit .NET API provides Document.TypeOfStorage Property in version 2020 and Document.get_TypeOfStorage() Method before. They can tell what the storage type of a built-in parameter has, e.g. Integer, Double, String, ElementId or even None. It is good. With the property/method there, we can know a built-in parameter a little better; otherwise... Continue reading
Question is very simple. Can any ElementId be opened as Element? Answer is pretty difficult. It depends. For those visible stuffs on screen such as Walls, Doors and Windows, yes, their ElementId properties can be opened as their Element instances. Even for many invisible stuffs such as Wall types, Door... Continue reading
It looks the Revit .NET API FamilyParameter.UserModifiable is not used commonly. Based on our experience, it almost always returns false, but through checking here and there we did not figure why. It seems the property always reads its default value (false) and exposes to outside. So, please do not call... Continue reading
It is pretty straightforward to purge Global Parameters programmatically using the Revit .NET API. The GlobalParameter class provides a few methods to help check whether it is used by dimensions, elements, or other Global Parameters. The three nice methods are: GetLabeledDimensions() GetAffectedElements() GetAffectedGlobalParameters() If they all return nothing or empty,... Continue reading
Revit .NET API follows the try/catch/finally pattern. Even for a can-not-be-too-simple method like InternalDefinition.SetAllowVaryBetweenGroups, try/catch block has to be always used; otherwise, the whole program logic may be broken due to the failure of the method call. Another small matter is that the most important parameter related class InternalDefinition is... Continue reading
Revit Organizer 2020 has been released. It supports and works with Revit 2020. More features are added, e.g. Shared Parameter Updaters for both project and family models/files, Style Replacers for elements, current view, entire model and even component families, and various Text Gadgets. Some existing features are improved, e.g. Family... Continue reading