Generate GUID in Revit

Generate GUID in Revit

AAdawiBIM
Contributor Contributor
21,111 Views
33 Replies
Message 1 of 34

Generate GUID in Revit

AAdawiBIM
Contributor
Contributor

Dears,

 

I need help for What is the best way to generate GUID code in Revit?

 

and if I generate GUID more than once, It will change for the same element or will remain when generation happen several times.

 

Thanks and my best regards,

0 Likes
21,112 Views
33 Replies
Replies (33)
Message 21 of 34

ToanDN
Consultant
Consultant
Elements added AFTER you exported IFC don't have ifcGUID. Export again.
0 Likes
Message 22 of 34

koert.vynckier
Advocate
Advocate

Elements in Groups may not have an IfcGUID value stored in them.

Apparently that parameter is set to not vary between Groups, which is of course total and utter workflow-breaking nonsense.

In 2020 you'll get an error-message that asks you whether you want to ungroup your groups so that the IfcGUID parameter can be stored in the file.

In other versions storing the parameter just silently fails.

https://github.com/Autodesk/revit-ifc/issues/164

 

Message 23 of 34

mdulaney
Enthusiast
Enthusiast

Thank you.

 

Message 24 of 34

dennis.huisman
Contributor
Contributor

Same problem here.

I found the next solution (and when you think of it it's quite logical)

We often start the first project from our template.

When we start the 2nd project many people (including all off us here apparently) delete the data and save it as a new project. REVIT Does not understand it's a new project so it does not generate a new GUID.

 

LESSON:

Always start you project using a template, not from an old project file.

 

Solution:

When you have already created the projectfiles, transfer the project information from an intermediate project. 

 

0 Likes
Message 25 of 34

RobDraw
Mentor
Mentor

@dennis.huisman wrote:

LESSON:

Always start you project using a template, not from an old project file.


 

The assumption that was used as a basis for this statement is incorrect. While some may use an old project, it's actually more common to use a project that was designed to be used as a template. There are some valid reasons for using this approach.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 26 of 34

dennis.huisman
Contributor
Contributor

@RobDraw Offcourse I know we think there are valid reasons for starting with an old project file, but are they realy valid?

What is the reason of even creating a template when not using it to start a project?

You should store all valid information in your template thats what it's for.

When you need the information of an old project, create a (new)template of it.

When you don't your IFC's will generate the same GUIDs and eventualy you will run into this problem.

 

Let me refrase, only the coordination model has to be created from a template if you wish.

All aspect models will transfer the project standards from this coordination model and from then are interconnected with its host/coordination model. 

From here they will be generating the same GUIDs as its hostmodel (ofcourse it should because all aspect models together will form the complete building)

 

0 Likes
Message 27 of 34

Mohamed-Nassar
Collaborator
Collaborator

why do you need it?

 

----------------------------------------------------------------------------------
If the above reply answers your question; Please mark it with ACCEPT SOLUTION
----------------------------------------------------------------------------------

Mohamed Nassar , ACP, Autodesk Ambassador Gold
BIM Support / Structure Modeler
0 Likes
Message 28 of 34

RobDraw
Mentor
Mentor

@dennis.huisman wrote:

@RobDraw Offcourse I know we think there are valid reasons for starting with an old project file, but are they realy valid?


 

First off, who are this we that you speak of? You shouldn't speak for others, especially when you are voicing your own opinion. I omitted the word "old" deliberately. I said that these projects were designed to be used as a template and the good ones are updated and/or recreated with new releases.

 

When you've created enough projects, you come across some things that cannot be stored in templates that also cannot be transferred. Valid enough for you?

 

You also have to realize that there are a vast number of projects that don't require IFC. Valid enough for you?

 

Good luck!


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 29 of 34

Anonymous
Not applicable

Hello,

I have a question to further the discussion on modifying an element and its relationship to the GUID number.  If I select and element and then change its family type via the drop down list in the properties pallet, will this element still retain its same GUID number, or will changing the family's type also change the GUID number?

0 Likes
Message 30 of 34

dennis.huisman
Contributor
Contributor

Hi Andrew,

the GUID will remain the same if you change it trough the pull down menu.
When you delete the object and place the same object as a new one it will generate a new GUID.
Also notice there are 2GUIDs generated after export, there is an instance (to determine the location) and a type one which can be used to create your object type libary. 

0 Likes
Message 31 of 34

Anonymous
Not applicable

Thank you, Dennis.Huisman! That's exactly the information I was looking for.

0 Likes
Message 32 of 34

gdavis479JP
Contributor
Contributor

Referencing the BuildingCoder, or any other external site, without the actual links doesn't answer the question or address anyone's problem. Whoever moderates this, please convey that actual answers with direct information are desirable, not references to sites with thousands of posts to dig through.

0 Likes
Message 33 of 34

gdavis479JP
Contributor
Contributor

AntMc provided an actual detailed response and direct link. L. Mass did not, in clarification of my previous comments. IE, it doesn't appear that we can reply to a specific comment in the forum and have our reply directly under that specific comment.

0 Likes
Message 34 of 34

RobDraw
Mentor
Mentor

These forums are barely moderated, nevermind responses being analyzed for presentation or accuracy or anything else you can think of but, if you look hard enough, I'm sure they have a product feedback forum or community suggestion forum where your concerns will be heard by Autodesk. 


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes