Følg

How to override project-level GUID's

How to override project-level GUID's

This information is based on the latest Naviate IFC exporter and the Autodesk opensource IFC exporter for Revit.
Published 02.11.14 its likely to change within the next months.

If you copy a projectfile it will still export the same GUID for IfcProject, IfcSite and IfcBuilding.
This could be the situation if you had one too large projectfile you need to split by making a copy.
And sometimes you dont want the same project-level GUID's in multiple files.
You will need three "Project Information" parameters to fix this:

IfcProject GUID
IfcSite GUID
IfcBuilding GUID

First - check if you have them already by going to Manage -> Project Information.
If you dont have them just export an IFC file.
And make sure that the  UI option "Store the IfcGuid in an element parameter after export" is checked.
Then you will have something that looks like this:

lockedguids.png


Theres a couple of ways to change these values.
This is probably the simplest one:
(Courtsey of Peter Lund at BSK architects in Sweden)

1. Start a new temporary projectfile.
2. Export the temp-file to IFC using "Store the IfcGuid in an element parameter after export" checked in the UI.
3  Back in your projectfile with the wrong project-level GUIDs start "Transfer Project Standards".
4  In "Transfer Project Standards" copy the "Project Info" element into your projectfile.

This will overwrite the old GUID's with the ones from the new file.

NOTE: This will also overwrite any Shared Coordinates with the same name.
So make sure these two files doesnt contain Sites with the same name. (Manage - > Location -> Site)

This trick could be used in different ways.
Either if you need different GUID's as in this case.
Or if you need the same GUID's in multiple files.

However, sometimes life is not that simple.
Lets say you want the same "IfcProject GUID" and "IfcSite GUID" in multiple files.
But not the same "IfcBuilding GUID", then what ?

Using Transfer Project Standards you can only copy all three of them at the same time, not just one or two.

if your Project Information doesnt contain these parameters just look at the 1-2-3 list below on how to do this.
But if they for some reason is just stuck there with the wrong GUIDs you will need to remove them.

The only way to do so is to delete and recreate "Project Information".
Allowing you to create your own editable versions of the same parameters.

Before doing so you might want to take note of other selfmade "Project Info" parameters and their values.
Because you will need to recreate them.

In order to delete "Project Info" you need a tool that allows you to select the element "Project Info"
This can be done with the Naviate Filter function, or any other tool that lets you select "Project Info" as an element.
When it's selected just push the Delete button on your keyboard.

In doing so you will notice that your Project Information button on the ribbon becomes inactive. (as there is no Project Info anymore)
To activate it again just copy "Project Info" from another project using "Transfer Project Standards" on the "Manage" tab.
Now we are ready to create our own editable project-level GUID parameter..
The reason this is going to work is this:
The exporter only looks for a parametername containing a valid GUID.
It doesnt care if the parameter is read-only, shared or project parameter.
If it finds "IfcBuilding IFC" its not going to create the problematic readonly parameter.
So having cleaned out the readonly parameters, we can now create our own editable "IfcBuilding GUID" parameter like this:

1. 
Go to "Project Parameters" under the Manage.tab and create a new parameter called "IfcBuilding GUID"  for category "Project Information": 
(It doesnt have to be a shared parameter, project parameters will do)

2. 
Then go to "Project information" and give the parameter a valid guid.
A valid guid looks like this: 20wuc6olf3Mg5VUmgpyn9N (22 signs with no braces or hyphens)

And here comes the crucially important part.
If you are using the UI checkbox  "Store the IfcGuid in an element parameter after export":

Before you export make sure to give your new editable guid-parameter a valid GUID.
If not then Revit will recreate and use the readonly parameters with the GUID you dont want.
And you will have to delete and recreate "Project Info" again.


3. 
On exporting the project to IFC you will see that the guid will be the one you specified.

buildingguid.png

 
After the export where you store the GUID in the file, your "Project Information" is going to look like this:
openbuildingguid.png

 

 

For Revit Levels there is currently no known way to override or change the resulting IfcBuildingStorey GUID.
Deleting the Level and making a new one should work though that is not an option for everyone.

To change the Level GUID you will need to edit the IFC file in Notepad manually.
Open the IFC file in Notepad and search for IFCBUILDINGSTOREY.
The GUID is the first argument on the IFCBUILDINGSTOREY lines.
(The number #110 will vary from file to file.)

#110= IFCBUILDINGSTOREY('08q4CrH6b54QVVBeHpFsJf',#41,'Level 1',$,$,#108,$,'Level 1',.ELEMENT.,0.);

Var denne artikkelen nyttig?
0 av 0 syntes dette var nyttig
Har du flere spørsmål? Send oss en henvendelse

0 Kommentarer

logg på hvis du vil legge inn en kommentar.
Levert av Zendesk