Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Tuesday, August 01, 2023

2024.1 Schema Warning

Glynnis with IDEATE posted information at the Autodesk User Forums that you should be aware of if you're using 3rd party tools and are going to deploy, or have deployed, Revit 2024.1. Ironic that this update is the one that has caused a potential disruptive issue since many firms wait for this point release to deploy. I've taken her initial post and copied it here, go read the entire thread for any more recent commentary. Thanks Glynnis!

There's been a lot of chatter about the Schema error that was landing in a post about What's New in 2024.1 so I took the good suggestion from @RobDraw to start a new thread here.

What is a Schema?

I welcome other people's input on this, but from my perspective, a schema can be best thought of as a blob of Revit metadata, held in Extensible Storage workset, that has a unique GUID. This blob of data is most often used by 3rd party developers but is also used by Autodesk (or companies acquired by Autodesk). The structure of that data, per each GUID, needs to be the same. If a developer alters the data structure, then a new GUID is needed to avoid the error.

What causes a Schema error?

In order to experience a Schema error, you need to have two files (or a file with a linked file) that have the same schema GUID but with a different data structure. Whichever file is opened first 'wins' within the active Revit session. This makes solving these problems REALLY hard because the file that displays the error is not necessarily the file with the 'problem' schema. It's also why this problem seems to be squashed sometimes and then resurface later. If you only ever open one Revit file at a time within a session of Revit, you'll never see the error.

What's the New Problem

The new problem seems to relate to Revit files that are upgraded to 2024/2024.1. The 11 July Revit 2024.1 release notes show that in there were changes made to the API to try and fix an outstanding schema condition. It feels like that change may have created some new conditions. We have an open case with Autodesk on this issue.


This is the latest schema article on this at Autodesk

Autodesk Revit schema issue article

Monday, December 23, 2019

Revit 2020.2 Internal Origin Part Three

John Pierson and Parallax Team Apps recently shared a solution at the Autodesk App Store called Internal Origin Hide-ifier. I thought mine was cool but it doesn't install itself or come with a Doge.


It's only 1,000 bucks...nope its free!! Check it out.

Tuesday, November 26, 2019

Revit 2020.2 Turn Off Internal Origin - Dynamo Option

In a thread at RFO John Pierson (Parallax Team, and Dynamo guru) got the ball rolling with a video link that described overriding graphics in views. I picked up the ball and created the graph but missed an essential but tiny setting for one node to make it work (Lacing - Cross Product).

The Dynamo Graph looks like this (click to Download).


You can use Dynamo, with this graph, to turn off the Internal Origin, Survey Point, and Project Base Point in floor and ceiling plans, sections, elevations and 3D views. Change the code block from False to True and it will turn them all on instead.

Regarding Jean-Marc's comment: I think he was suggesting this instead.

Thursday, September 27, 2018

Property Boundary and Coordinate Data - Dynamo

Alternate title: Mr. Revit OpEd finally does something (tho basic) with Dynamo!

I used this problem as an excuse to dig into Dynamo a bit. I created the attached graph to read a text file with coordinate values, one line per X,Y,Z values.


The text file format is very basic, it looks like this:


I created a 3D cylinder and model lines to form a target symbol family, 3D and fairly large so I could see it anywhere in the model. The graph places a target family at each coordinate location. Before running the graph, I assigned the Project Units for Length to Meter. Then I ran (manual) the Dynamo graph to place the target families. The last step was to start the Property Line tool and sketch the property boundary segments from target to target, which looks like this.


It was necessary to move the points closer to Revit's origin so they were not so far away, since Revit hates that. After doing that, I moved the Survey Point (not clipped) to one corner of the property (target family location) and then used Specify Coordinates at Point at that location using the coordinate values for that corner. This will allow me to export the result to DWG, if necessary. I also created a specific Spot Coordinate family type so I could identify some or every target location and make sure each reports the correct coordinates, double checking my work so to speak.

I probably spent a couple hours on this, mostly trying to get my head wrapped around which nodes in Dynamo to use. The next time I'll be twice as fast!

Friday, September 07, 2018

Post Echo - Units - Accuracy - Tolerance

I saw David Baldacchino's tweet yesterday sharing a link to a blog post for another software product called FME from Safe Software. The article goes into detail more related to their own product naturally but it does describe the math and computer problems that developers deal with. I found it quite interesting as well as confirming much of what I'd read and been told in the past.

Have a look! It's titled: "FME 2018 Infinity War: How Automatic Tolerance Defeats Infinite Precision without a Snap – but with Anchored Vertices!"

Wednesday, December 20, 2017

Dimension Inline and Dynamo

(Edit: If you download and apply an update to his Rhythm package after 1/17/2018 you'll have this node too)

From time to time I've heard people ask about putting the dimension value on the line (inline) instead of above the dimension line the way Revit prefers. The only way we can do it within Revit is to manually grip and drag the dimension value down to the line.

More recently I read a thread at the Autodesk Forum asking about this. The premise in their situation is that it is a significant roadblock to using Revit for one of their client's projects, it doesn't meet their drawing standard unless the dimensions are inline.

I was trading messages with Aaron Maller and mentioned it to him. Aaron was trading messages with John Pierson and a few minutes later I learned it is possible with Dynamo and a custom node. This morning he shared this with me, as well as replying to the thread. Nicely done John! We are sooo connected these days.

Friday, June 10, 2016

Revit Safe Mode - Wish Fulfilled

The other day I wrote about David's idea for a Revit Safe mode and Robert Manna responded in a serious way. He and the gang at Stantec created and have just shared an application to do just what we were suggesting. This is a screen shot of it running (from Robert's post).


It runs outside of Revit, prepares for opening Revit without the add-ins you choose to disable. It allows us to be fairly surgical in our troubleshooting even if it's akin to exploratory surgery ... "Hmmm, maybe we need to remove the appendix? No, that wasn't it...maybe the spleen?"

If you're curious head over to Robert's post on their blog for more information and to download the application.

Tuesday, January 05, 2016

Doors and Rooms and Rooms and Doors

In the year 2016 we find Revit is still utterly clueless about the relationship between doors and rooms. We have this quirky documentation habit of using a room's number to derive a door number, not to mention it's room name to define its location in a building. I know they've noticed because each door has a From Room and To Room parameter.

Recently Elon Musk and his SpaceX team sent a rocket to space and returned the first stage to an upright position back on earth. A feat engineers have long dreamed of accomplishing.

Yet after 15 years Revit continues to rely on third party applications to bridge this feature crevasse.

Don't get me started on the Space Naming Utility being a separate application...grumble grumble...

Monday, November 03, 2014

Dynamo Tip and Forum

If you open a Dynamo project that is based on a language that is not the same language as the Revit project you are in it can cause Revit/Dynamo to crash. We can avoid the crash if we open a project that shares the same language first. That's how it was described to me at RTC in Dublin this past week. Perhaps it is just a build incompatibility? It seems to me that will make it difficult to mix and match up Dynamo work that is done in various languages?

The best place to stay in the loop about Dynamo info is DynamoBim.org. Better check in with the forum there to be sure.

BTW, regarding forums, AUGI recently created a new forum for Dynamo, to expand their Revit forums to include a place for this rapidly emerging tool. You can VISIT it HERE.

Tuesday, October 28, 2014

Occupancy Calculations and JavaScript

The other day I read a post at Revit Add-ons about integrating Java Scripts into Revit. I was intrigued by an example it described which provides a connection between a java script calculation (formula) and assigns it to a parameter. A very common request among Revit users is to be able to associate with a formula with a Shared Parameter, and in this case occupancy calculations. Timing is a funny thing because an email came in the same day asking for advice doing these calculations.

The application is called LazJS and is currently offering a beta version 1.0. Fwiw, I created an Occupancy Calculation sample project years ago which you can download HERE. I thought I'd open that project and try LazJS out on it. Since we can't put a calculated value in a tag the example uses a schedule so we can transfer values manually. With the advent of the API there are more options but for anyone who is leery of programming it's still a bit intimidating.

I found it was really easy to get this installed and configure LazJS to fill in the values for me automatically and keep them updated if I make any changes. This is the dialog that appears for their ParamJS tool. I started by choosing the Rooms category. Then I chose the parameter that is in my room tag. Then I dragged the parameter whose value I wanted to be in the tag up to the code editor window. Once the code was present I clicked Run, seeing values in the results window I clicked Save.


Now whenever I add a room and assign a occupancy type its tag fills in the appropriate Occupancy Factor for me (the script does). Same for any editing I do of existing rooms.


Worth a closer look if only for this piece of their whole application.

Monday, December 09, 2013

Fuzor

While attending Autodesk University last week Elaine with NBBJ mentioned a new product she is familiar with called Fuzor. She said I should check it out on the exhibit floor. Wednesday night I stopped by to have a look.


It's a stand-alone software intended to allow real time rendering and simulation of a Revit model. It also "plugs in" to Revit with its own tools on the ribbon. For example you can use View Sync to update Fuzor as you change your view in Revit. You can initiate changes by selecting elements in Fuzor and using the Edit Selection button on the ribbon in Revit.

Open your project, launch Fuzor, wait for it to load the model and you're off. Elaine opened up a project a team in her office has been working on so it was not a small model, nor just one model. Navigation was simple enough. If you've used the walk feature in Revit or the same concept in Navisworks you know enough to get around.

There is no export from Revit. Just open your project in Revit and then run Fuzor (separate application window). The only time you'll spend waiting is the initial load, about the same as waiting for Revit to load the project initially, perhaps a bit faster. Between the real time visualization and no export it's a pretty compelling option. The closest thing I can think of is the Lux module from M-Six's Veo.

The product is only about six months old at this point and about to become available for evaluation. It's being developed by a team based in San Diego, CA. If you are interested they are asking us to send a request via EMAIL. There is a PDF Manual if you'd like to read it. The price if I recall correctly is about $3,500.00 USD. They will be able to support network licensing as well.

Key Feature Summary
  • Geometry Updates in Fuzor as soon as Revit data changes
  • Select elements in Fuzor first and then edit in Revit
  • Load specific levels (they call them layers) from linked files
  • Materials changes in Revit update Fuzor immediately
  • Camera Synchronization between Revit and Fuzor
  • Correct Time of Day Simulation
  • Weather Conditions: sunny, storm clouds, rain and rain with wind direction
  • Walk and Fly through controls
  • Uses Revit lighting data for interior lighting
I've embedded their intro video, follow THIS LINK for five others.


Friday, November 08, 2013

Project Version Wish Revisited

Blogging, twitter and otherwise working "on the line" is cool!! I complained in a blog post just two days ago about not knowing the version of a Revit project file. Sean Burke via Twitter suggested the API might be harnessed to provide a solution, specifically tagging Harry of Boost Your BIM. Harry took up the challenge and within a few hours provided a solution and a video to demonstrate how cool working with the Revit API can be (yes Harry is cool too).

Here's the video he shared via his Blog Post response.


Harry's solution looks great and I'm off to download it!! Of course this means I'll have to whine on my blog more often.

Thursday, October 31, 2013

Column and Beam Relationship Macro Idea

I wrote a post that described the parameters (Start Attachment Type and End Attachment Type) that can be harnessed to make beams respond to column changes, specifically the height of the column to cause a beam to slope. While chatting with some Revit Structure users it occurred to me that it would nice if a macro existed that could automate the process a bit. As it stands now we often need to deal with each beam carefully to determine which end of the beam is actually attached to the column. It is easy to see now with the addition of colored ends (green for start and red for end) when Show Analytical Model is used.

That written, we could just select all of the beams, say for a roof structure, and change both parameters, Start and End Attachment Type, from End Elevation to Distance. If their supporting column's Top Constraint or Top Offset values don't change then the beams won't either. In that context it's not hard to just select them all and apply the same parameter values regardless of whether they will need to change or not.

If we want to be more selective, I imagine it would be nicer to start a macro, select a column and let the macro determine which end is connected, for each beam, and alter the required parameters. Alternatively the macro could let us select beams and then the related column we want the beams to follow. Ideally the macro could let us choose between the two approaches. Technically the macro doesn't need to know which column to change the parameter if we just want to change both parameter values. It matters if we'd prefer to only change the parameter relevant to a specific column.

Perhaps such a macro exists individually or as part of a collection I haven't noticed yet? If so, enlighten me. If not I'd be happy to brag about the developer that creates it. Second guessing...is it even worthwhile?

Wednesday, October 16, 2013

Finish Floors and Doors

It's a fairly common practice to create separate floors for structure and finishes. The structural "layer" of a floor may actually be modeled by the structural consultant, assuming the structural engineer we are working with uses Revit and isn't working directly in the same model with us (architecture bias in this post).

Architects usually document floor finishes. Quite often I see this done as a Filled Region exercise. The effort required to sketch a filled region is not much different than sketching a floor boundary. The benefit of using a floor instead is that's it modeled and it will be available in many views, as needed. We can tag and schedule them to study and document the design more effectively. External applications like Revolution Design's Revit Workflows offer a specific set of tools to manage creating finish floors very effectively. KiwiCodes offers their own version as part of their Bonus Tools app. These tools make the notion of using finish floors that much easier to consider.

One side effect of modeling finish floors is that they can compromise the door graphics we use, for example the panel and swing we are used to seeing in plan views. This happens because these graphic features are usually created on the work plane of the host level. The other issue is that, even if the floor doesn't obscure the graphics, the door panel, if just lines, probably won't mask the floor finish fill pattern (if one is used).

If we create a masking region (or lines) directly in the door family, to represent the door panel it will mask the floor finish as long as the Draw in Foreground parameter is checked.


Quirkiness ensues if a nested family is used. I happen to prefer to deal with swing graphics as a nested family. My logic is to make it once and use it in many families; a "kit of parts" mindset. Unfortunately the Draw in Foreground setting fails to work when the nested component is brought into the host door family.

To resolve this we need to make it possible to raise the graphics higher. Filled and Masking Regions can be assigned to a Reference Plane; Model and Symbolic lines too. This means we can use a parameter to change the elevation of the graphics, via the parameter and associated reference plane, to compensate for various floor finish conditions. The setting Draw in Foreground will allow this to work as long as we don't check it, which seems counter-intuitive.

In this image I've use the Draw in Foreground setting on native lines and masking regions, not checked on the left and checked on the right. I've also nested a swing family. The red elements are visible and the highlighted (purplish) are not visible except that they show up because I've got my cursor hovering over the family.


To get the nested swing family to show up above the floor is was necessary to not check the Draw in Foreground parameter for the masking region and lines. It was also necessary to place them on a separate work plane in the family that I could control with a parameter to raise it above the floor elevation in the project.


In the image above the only graphics that don't show up now are the bottom left line and masking region. They won't show up because the Draw in Foreground parameter is not checked. It's easy to sort out once you know.

Speaking of 3rd party applications, I used the Revolution Design tool to create floors for my testing. The app coughed when I tried to put in some floors. After looking at the error message I noticed that the doors I was working with don't map a value to the stock Width parameter, they use their own parameter to control the width. This annoyed the floor tool because it's looking for that parameter, the stock "Width". It's hard enough for programmer's to create applications that suit our varied needs. It's even harder when we create content in a different way than what they might reasonably expect in order to complete their tasks.

At first I was a bit confused but then I remembered that their floor tool will create a sketch that turns into door openings to define where the edge of the floor will stop for thresholds. The application looks at any doors it finds along the boundary of the room and creates a sketch based on the door Width parameter it expects to find. In this case the value was zero width and that made the application mad, Revit too. It was easy to fix. I just used a formula in the Width parameter that mapped it to the parameter these doors were using instead. Just another subtle thing to consider when we make content.

Tuesday, September 10, 2013

Learn to Program the Revit API

If you are interested in learning the Revit API Harry Mattison (Boost Your BIM) created an online course hosted at Udemy (The Academy of You).

It's delivered in 33 video segments which vary from a few minutes to a little over fifteen minutes. It's also very reasonably priced at $149.00. Maybe I'll see you on campus?

Learn to Program the Revit API

Monday, June 03, 2013

Revit 2014 API Languages

Revit 2014 has added a couple new language options for people who can speak to Revit through its API (application programming interface). If you have a long history with CAD you might have spent more than a few hours "Lost in parenthesis" (LISP)? In Revit we can get lost in them when we deal with conditional formulas in the family editor.

In Revit 2013 the API supported two languages C++ and C# (technically any VB.net language). Revit 2014 has added Ruby (aka Ruby on Rails) and Python. If you have no programming experience they are not gems or reptiles, just alternatives to the far more widely used C++ and the much newer C# (and supposedly "easier to learn").



The dialog is a little smaller too (really subtle eh?).

If you are looking to get started with the Revit API you might consider Don Rudder's book:

Instant Autodesk Revit 2013 Customization with .NET How-to

Looking for some hands-on training with a sherpa? Get in touch with Harry Mattison (Boost Your BIM), he's gone from deep within Autodesk working on Revit and its API to the life of a freelancer who shares his knowledge on his blog and creates applications for hire. He's started offering some online training too.

Don Rudder and Case-inc have also offered API focused training in the past and are always considering hosting another so keep an eye on their site for a future class offering.

I've also written a couple blog posts before about getting started with the API (though I'm still remiss in taking it seriously myself).

Getting Started with the Revit API
My First Revit Plug-in

Years ago when I did some programming more seriously I found the book "Code Complete" by Steve McConnell quite helpful to help understand the process and concepts.

Happy coding!

Monday, February 18, 2013

View Template Usage

The other day I wrote about my transition between Revit versions and differences between what we can do with View Templates. Harry "Mr. Boost Your BIM" Mattison offered some code to relieve the tension. It's pretty cool how few lines of code and provide useful answers. Check out his post. Be sure to read his post tomorrow too, he's going to enhance it a bit and share that too!

Wednesday, January 16, 2013

Image-O-Matic

Earlier I wrote that Harry started a blog (Boost Your BIM) focused on using the Revit API to enhance your projects and process. He created his first formal application, Image-O-Matic, which is now available on the Autodesk Exchange. When I first saw it I thought about using it to document testing family parameters and types.

He decided to run a contest to encourage Revit users to get acquainted with the app. He offered up a tantalizing video of Marcello Sgambelluri's work to get your creative urge going. Visit his site for all the contest details. Here's an embedded copy of the video he posted.


Monday, December 03, 2012

Boost Your BIM

Harry Mattison has joined the API blogging world for Revit with "Boost Your BIM". He's started out with a practical project dealing with the tragic Duplicate Mark Value error we receive on projects that use worksets. Each post is a step in and through the process. He's only just begun with a few of the steps (posts) so far. I believe the intention is to take it slow and easy enough that even I can do it! Here's hoping Harry can keep at it!

Thursday, February 09, 2012

Pushing Parameters Around

Alternate title, "Getting What I Want"

I wanted to show a parameter for Mounting Height. I needed it assigned to a variety of elements. This isn't hard for families that are not hosted. Face-based families on the other hand seem to know what their "Elevation" value is but they are uninterested in sharing that data with a schedule. It's just not listed in the Available Fields list. Mean Revit!

This is a story of a white knight coming to the rescue, or rather Whitefeet coming to the rescue.


Obviously not the cat, I must mean the tools that Mario Guttman has made available to us via his alter ego "Whitefeet Tools". To get what I wanted I created a shared parameter called Mounting Height and added it to my project. For this post and this example I've assigned it to the cateory Data Devices. Once that's in place the steps are pretty easy (apart from getting the tool installed).

You either select all the devices first or just tell the tool to apply it to everything in the model. You start by running the Parameter Tools.


Next you click the Math Calculation button.


Now you've got to fill in some blanks and click a button.


When your information matches the image (change the category appropriately, I show Security Devices for example, Obviously this picture and the next one don't sync up, taken at different times).

Once the routine runs you can close the open dialog boxes and check the results. Cool eh?


Want to watch a video?