Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Different "LcRevitId" Value for different extraction Methods of ModelItem

johann.haak
Participant

Different "LcRevitId" Value for different extraction Methods of ModelItem

johann.haak
Participant
Participant

I have been experiencing following issue:
Depending on the way I extract ModelItems from NavisWorks I get different amount of Information and exspecially different "LcRevitId" Values for the same ModelItem. For me it happens if I use CableTrayFittings. When I use Seach class I get the actual Revit Id:

johannhaak_1-1669728735709.png

 


If I use 

ModelItemCollection selectionModelItems = new ModelItemCollection();
Autodesk.Navisworks.Api.Application.ActiveDocument.CurrentSelection.SelectedItems.CopyTo(selectionModelItems);

I get a different Id for the same Element

johannhaak_0-1669728005812.png


Two Questions:
1) What is the Reason for this and why does it on ly happen to certain Element Categories: For example it does not happen for CableTrays
2) What I have been doing so far is Quering all the Items with the Search class and then to mapping the two modelItems, the only thing I found that might works is to check if the bounding boxes are the same. Are their any better options on how to map the ModelItems?

0 Likes
Reply
Accepted solutions (1)
670 Views
6 Replies
Replies (6)

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @johann.haak ,

Could you please send me the non-confidential Navisworks sample file and step-by-step approach to reproduce the issue?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

johann.haak
Participant
Participant

Hi, @naveen.kumar.t
sorry for not answering so long.
But I have a non confidential Navisworks files now.

Reproduction to the Issue is the following way:
1. Step Use Search functionality in Navisworks to select following ModelItem by Revit Id: "1679205"
As you can see in the picture the Revit Id shown in the Properties has following Value.

johannhaak_1-1672831751443.png

 


2.Step select ModelItem by clicking it over the UI:
johannhaak_0-1672831296361.png
Now here the RevitId has a diffrent Value.

 

 


Important: This only applies for cabletrayFitttings not for cable trays. So for non system families.

0 Likes

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @johann.haak ,

 

Thank you for the sample file.

I have asked the Navisworks Engineering team.

I will come back to you as soon as I receive a response from the Navisworks Engineering team.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

naveen.kumar.t
Autodesk Support
Autodesk Support

One suggestion is to look at the Selection Tree. You may probably be picking a different item.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @johann.haak ,

 

I checked the selection tree. 

Looks like a 2 different items to me.

1.png2.png


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

johann.haak
Participant
Participant

@naveen.kumar.t 
Thanks for helping out with this. In the end I can still not tell 100 percent why the ModelItem Hirachie goes deeper with Non System Families, but I feel this is the way our Revit Models work.
But more important with your Feedback i am now able to find the Instance of the ModelItem that references to the Revit Id, by looking through the selected ModelItems Ancestors. 

0 Likes