Solutions, criticism, opportunities:
Richard RPThomas108 Thomas and Juan Jesús jjesusdelpino Del Pino Campos collaborated nicely to determine which categories that can create legend components:
Question: Is there a way to know if a legend component can be created from a determined category? E.g., I can create legend components from cable trays, but I can't do it with railings. I haven't seen any specific rule o parameter that specifies this property. Any ideas? Thanks.
Answer: I've found no obvious solution to this via the API, i.e., a Boolean property on the category class.
I believe also that Legend views don't have a specific class.
So, there is no static methods available on such for checking category suitability of placed elements that way either.
You'll find sketch based system families (floors/Railings/Stairs...) are not applicable since Legend views don't have a sketch plane.
If you think about it, apart from annotation objects, Legend views contain types not instances (since you usually drag the types onto the Legend from the project browser).
However, there is also no property for this indicated on ElementType
class.
Response: I also have not found any solution for this through API, so I have ended up checking and making the list manually.
I put it here in case someone looking for the same thing comes:
FamilyInstances = [“OST_DuctAccessory”, “OST_PipeAccessory”, “OST_PlumbingFixtures”, “OST_StructuralFraming”, “OST_StructuralFoundation”, “OST_ElectricalEquipment”, “OST_SpecialityEquipment”, “OST_MechanicalEquipment”, “OST_LightingFixtures”, “OST_Furniture”, “OST_Casework”, “OST_Columns”, “OST_StructuralColumns”, ”OST_Doors”, ”OST_Sprinklers”, “OST_DuctTerminal”, “OST_DuctFitting”, “OST_PipeFitting”, “OST_Planting”, “OST_Windows”]; SystemFamilies = [“OST_CableTray”, ”OST_RoofSoffit”, “OST_Ceilings”, “OST_DuctCurves”, “OST_Roofs”, “OST_Walls”, “OST_StackedWalls”, ”OST_CurtainWallPanels”, “OST_Floors”, ”OST_PipeCurves”, ”OST_FlexPipeCurves”,” OST_Conduit”];
Many thanks to Juan Jesús and Richard for sharing this result.
I cleaned it up and added it to The Building Coder samples for posterity like this:
BuiltInCategory [] _bics_for_legend_component_with_FamilyInstance = new BuiltInCategory[] { BuiltInCategory.OST_Casework, BuiltInCategory.OST_Columns, BuiltInCategory.OST_Doors, BuiltInCategory.OST_DuctAccessory, BuiltInCategory.OST_DuctFitting, BuiltInCategory.OST_DuctTerminal, BuiltInCategory.OST_ElectricalEquipment, BuiltInCategory.OST_Furniture, BuiltInCategory.OST_LightingFixtures, BuiltInCategory.OST_MechanicalEquipment, BuiltInCategory.OST_PipeAccessory, BuiltInCategory.OST_PipeFitting, BuiltInCategory.OST_Planting, BuiltInCategory.OST_PlumbingFixtures, BuiltInCategory.OST_SpecialityEquipment, BuiltInCategory.OST_Sprinklers, BuiltInCategory.OST_StructuralColumns, BuiltInCategory.OST_StructuralFoundation, BuiltInCategory.OST_StructuralFraming, BuiltInCategory.OST_Windows }; BuiltInCategory[] _bics_for_legend_component_with_SystemFamily = new BuiltInCategory[] { BuiltInCategory.OST_CableTray, BuiltInCategory.OST_Ceilings, BuiltInCategory.OST_Conduit, BuiltInCategory.OST_CurtainWallPanels, BuiltInCategory.OST_DuctCurves, BuiltInCategory.OST_FlexPipeCurves, BuiltInCategory.OST_Floors, BuiltInCategory.OST_PipeCurves, BuiltInCategory.OST_RoofSoffit, BuiltInCategory.OST_Roofs, BuiltInCategory.OST_StackedWalls, BuiltInCategory.OST_Walls };
Slightly ****, I know.
Response: In the end I have had to use that list with BuiltInCategory
entries in my code so your **** retentiveness has already been proven necessary haha.
Answer: Glad to hear it was useful for you!
I am in discussion with friends on the topic of perfection versus the Pareto 80-20 principle.
I try to favour both.
I see this as an effective demonstration that both can be achieved simultaneously.
In simple cases only, of course.
Luckily, all programming issues are simple, always.
Unless someone seriously messed them up.
Unfortunately, the most common case...
The encoding issues when reading data from size lookup tables with Cyrillic characters is resolved in the Revit 2021.1 update release.
The development team resolved the issue REVIT-153006 – Encoding issue reading data from size lookup table with Cyrillic characters -- 15738224 and report the good news:
We have now fixed and closed this issue in the development release.
It has been addressed in work done for REVIT-161509.
That fix is present in Revit 2021.1 and any version of Revit after that.
For previous versions, one option to try is to see if generating the CSV files as UTF-16 (i.e., 2 byte Unicode) will cause them to be read properly, even in older versions of Revit that do not contain the fix.
Please note that our support for loading UTF-8 and UTF-16 requires that the files contain the proper UTF signature BOM at the beginning of the file. The UTF-8 files provided as samples DO NOT, but you can re-save them as UTF-8 in almost any text editor and force generation of this signature. Then Revit knows how to properly load and encode them with the fix. Revit is not a full blown text processor, so it relies on the presence of that BOM to properly handle files. Without it, Revit assume they are 'normal' ANSI encoded files and thus will not process them correctly.
Correction after another, deeper, look at the code prior to this fix, in older versions of Revit: Unfortunately, upon further investigation, that code assumes the file is a set of single byte characters to load. Not even a proper ANSI code page encoding is being applied, although the workarounds look like that is possibly going on as part of the internal file read… Anyway, I do not think using any sort of Unicode encoding on the files in question for previous versions of Revit will work after all. It does in the current version, though.
An interesting critical article in AEC Magazine discusses how Autodesk AEC customers demand better value.
Are you interested and motivated to contribute to reimagining the construction business for the digital age?
Autodesk is active in that area, enabling companies to address the most important challenges they face today while preparing for new ways of working in the future. The Autodesk Construction Cloud portfolio connects the office, trailer and field so customers can move seamlessly through each phase of a building’s lifecycle - from design and preconstruction to construction, turnover and operations - with best-in-class solutions that include Assemble Systems, BIM360, BuildingConnected and PlanGrid. General contractors, subcontractors, and owners around the world rely on ACS to win more work, enhance collaboration, speed decision-making, reduce risk, and improve overall project outcomes. We are looking for top Sales Professionals to join Autodesk Construction Solutions (ACS) team and work with clients in EMEA to uncover pain in their current processes and find value in leveraging the Autodesk Construction Cloud. Our Account Executives (AEs) represent ACS for their assigned geography in a fast paced and exciting industry! With a regional approach to selling into the construction industry, we are looking for someone to be the go-to resource and expert in their territory as we look to build net-new business and expand our existing account base across EMEA.
If so, would you like to consider applying for a job as Construction Account Executive?
Responsibilities:
Minimum qualifications:
Good luck applying for that or the many other opportunities that you can find all over the world in the Autodesk career site!