Here are some exciting Forge, Revit API and other topics for today:
- Forge online training in April 2021
- RevitApiDocs support for Revit 2021
- Welcome, AEC BIM Tools
- Visual materials API in Dynamo
- 24x24 stacked ribbon items
- Innovative drone fly-through film
Forge Online Training in April 2021
Are you interested in getting started with the Autodesk Forge platform development, perhaps in a more interactive, guided way? Or maybe you already have experience with our platform, and are just interested in honing your skills? If so, come and join us for another series of Forge Training webinars from April 13th until April 16th. During these days, our dev advocates will guide your through the development of sample applications (using Node.js or .NET) leveraging different parts of Forge, and answer your questions along the way as you develop these applications yourself. You can refer to Petr Broz's blog post for full details and register either here or there:
RevitApiDocs Support for Revit 2021
Back to the Revit API, Gui Talarico just announced an update to the online Revit API documentation for Revit 2021.1:
ApiDocs.co was updated last month and RevitApiDocs.com last Friday!
Very many thanks to Gui for the great news and all his work on this invaluable resource.
We hope to reduce the turn-around time for the next release :-)
Welcome, AEC BIM Tools
Simon Jones was one of the first and foremost AEC oriented people at Autodesk for a couple of decades in the previous millennium. Simon recently left Autodesk after over 35 years with us and launched AEC BIM Tools. He now published his first own Revit add-in, a Shared Parameter Inspector for Revit. You can download and test run a trial version. If you find it useful, you can donate what you think it is worth to you.
Good luck and much success in your new adventure, Simon!
Visual Materials API in Dynamo
Konrad K Sobon published a few more comments about materials in Revit, Dynamo, APIs etc.
It explores the use of Dynamo to create materials in Revit from something like an Excel spreadsheet, presents several useful solutions and also points out weaknesses in the current API functionality.
The material appearance asset property mapping image at the end is especially useful and valuable:
24x24 Stacked Ribbon Items
Diving deeper into some practical coding, let's look at the Revit API discussion forum thread on 24x24 StackedItems:
Question: This may be an easy one, but so far I am struggling to find anything specific about it.
How do you make a StackedItem
where the icons are 24x24 when there are only 2 in the stack?
It seems like it should be possible as it is used multiple times in the modify tab, cf. this example:
I have been able to set the ShowText
property to false
to get the 3 stacked icons, but, when I use the same method with the 2 icon stack, it remains 16x16, regardless of the icon resolution.
I have tried to obtain and change the button's height and width, minWidth and minHeight through the Autodesk.Window.RibbonItem object to no avail.
Has anyone had any success in creating these icons?
Alexander @aignatovich @CADBIMDeveloper Ignatovich, aka Александр Игнатович, presents an elegant solution with some very pretty code indeed:
Answer: I succeeded :-)
With text:
Without text:
var revitRibbonItem = UIFramework.RevitRibbonControl .RibbonControl.findRibbonItemById( ribbonItem.GetId() ); if( useMediumIconSize ) revitRibbonItem.Size = RibbonItemSize.Large; if( hideButtonCaption ) revitRibbonItem.ShowText = false;
GetId
is an extension method:
internal static class RibbonItemExtensions { public static string GetId( this RibbonItem ribbonItem ) { var type = typeof( RibbonItem ); var parentId = type .GetField( "m_parentId", BindingFlags.Instance | BindingFlags.NonPublic ) ?.GetValue( ribbonItem ) ?? string.Empty; var generateIdMethod = type .GetMethod( "generateId", BindingFlags.Static | BindingFlags.NonPublic ); return (string) generateIdMethod?.Invoke( ribbonItem, new[] { parentId, ribbonItem.Name } ); } }
Many thanks to Alexander for the nice solution and the succinct, instructive and inspiring coding.
Innovative Drone Fly-Through Film
The one-and-a-half-minute drone video Right Up Our Alley may help drive film making to new heights, lengths, curves and other experiences – Hollywood bigwigs shower praise on creators of Minnesota bowling alley drone video:
A single-take video shot with a drone flying through a Minnesota bowling alley has been hailed as "stupendous" by a string of celebrities and big-name film-makers. From there, the drone flies in and around bowlers in the lanes and drinkers at the bar, going in between legs and into the back compartment where the bowling pins are swept up and set up and all around – all in one shot. It finishes with something of a cliffhanger (SPOILER: No drones were seriously harmed in the making of the video). Key points:
- The video is all one-take
- It took about 10 to 12 attempts
- The only thing added in post-production is the audio
- The filmmakers are trying to encourage people to return to bars, restaurants and bowling alleys
- The near 90-second video titled Right Up Our Alley begins outside, the drone swoops in from across the street, through the doors, all around the bowling alley, bar, between people, next to the rolling bowling ball, ...