Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Point CLoud Indexer API

17 REPLIES 17
Reply
Message 1 of 18
henrikevers
2718 Views, 17 Replies

Point CLoud Indexer API

Hi

Is there a API or another way to programatically access the Indexer of PointCLouds? (The dialog that pops up when you try to import a different format point cloud e.g. e57)

 

Hope some can help me out. Thanks 🙂

Henrik

17 REPLIES 17
Message 2 of 18
jeremytammik
in reply to: henrikevers

Dear Henrik,

 

Yes, sure, the Revit API includes a Point Cloud Indexer API as described in this overview:

 

http://thebuildingcoder.typepad.com/blog/2011/11/au-begins-and-point-cloud-overview.html

 

For your convenience, I put together a dedicated point cloud topic group on The Building Coder listing other related posts as well:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.43

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 18
henrikevers
in reply to: jeremytammik

Hi Jeremy

 

Thank you very much for the reply. Very helpfull. I am though not at all familiar with C++. Mainly coding in VB or Python. Do you have an example of the Indexer API? or is it posible to access the functions through python? or command line, maybe?

Besides this we have another question that maybe you can answer as well. 🙂 We have had some questions if Revit / Recap, when it converts from e.g. .fls to .rcs, moves points into a grid structure? It is questions from land survayors, who believe this is the case, and mention that it is not sutable for their work if they can't count on that the points are in the same position as when they scan. Do you know if this is the case?

 

And thank you very much again

Best

Henrik

Message 4 of 18
jeremytammik
in reply to: henrikevers

Dear Henrik,

 

Wow, that was a pretty chase...

 

I finally discovered that Adam Nagy pulished a sample for Revit 2012.

 

He has now republished it on GitHub:

 

https://github.com/adamenagy/RevitPointCloudIndexer

 

It will be very interesting indeed to hear whether it works as is or can be modified to work with Revit 2015.

 

Please let us know what progress you make.

 

You might want to fork Adam's repository, keep track of the changes, and send him a pull request when done to ask him to merge them back in.

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 18
jeremytammik
in reply to: jeremytammik

Message 6 of 18
jeremytammik
in reply to: henrikevers

Dear Henrik,

 

We discussed this further and came up with important new information that you hopefully already encountered through other means as well:

 

The initial response from the development team on this was: "We moved away from writing indexers, right? ReCap SDK should be where customers go now?"

Indeed, that just about summarises it.

 

Arkady Gilman and his colleagues provided some more detail and background information:

 

I’m not really sure of the answer to that question. I believe (at least at the Recap level) we don’t write indexers, but just use indexers provided by the Recap team. We still do indexing of raw data into Recap format in Revit though.

 

The Revit 2013 API for alternative point cloud engine is absolutely deprecated. Please do not implement another engine. Use ReCap. Similarly, PCG is deprecated and should not be used.

 

Revit has an indexer, i.e. a separate executable that is launched when you want to insert a file other than RCP or RCS (e.g. PTX or PTS of FLS). But this indexer is de-facto a 'headless' version of ReCap. So adding a 'codec' (I think they use this term) for ReCap will automatically make new format available for Revit indexer as well. But in general, Revit indexer is intended for a novice, sporadic user. We assume that people using point clouds 'for real' will use ReCap to index and register scans before importing the data to Revit.

 

The Revit team does not write indexers, but just uses the ones provided by the Recap team. We still do indexing of raw data into Recap format in Revit though.

 

ReCap may be making and supporting the standalone indexer at some point. Revit probably only uses our thin UI for converting old (PCG) point cloud files into the ReCap format (RCP, RCS).

 

Can you clarify what you are trying to do? Do you want to index some new 'raw' data format that ReCap does not currently recognize?

 

From the thread it is not clear exactly what you want to achieve.

 

You ask: We have had some questions if Revit / Recap, when it converts from e.g. .fls to .rcs, moves points into a grid structure? It is questions from land surveyors, who believe this is the case, and mention that it is not suitable for their work if they can't count on that the points are in the same position as when they scan. Do you know if this is the case?

 

The answer is that ReCap indexing does not alter point coordinates; they are completely sacred.

 

What do you mean by 'moving points into a grid structure'? ReCap stores points in a spatial tree, but this is just the method used to quickly find points within a given part of space.

 

There is whole separate issue w/regard to what happens with different scans when they are registered with respect to one another.

 

I hope this helps.

 

Please let us know where you are with this now.

 

Thank you!

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 18
henrikevers
in reply to: jeremytammik

Hi Jeremy

 

First of all thank you very much for your answers this is really great. 🙂

 

To explain what we are doing. Then I am part of a research group called CITA (Center for IT and Architecture) at the school of architecture in Copenhagen, Denmark. We are part of an EU funded research project called duraark (duraark.eu), which shortly described, deals with the life circle of architectural knowledge (in this case ifc and e57 formats). The project deals with how a longterm archieve of architectural knowledge can be set up and integrated into the workflows of the stakeholders envolved in the architectural diciplines. For this we are developing methods of e.g. extracting metadata and verifying quality from point clouds and from comparison of point clouds and BIM models.

Because the majority of the stakeholders are working in Autodesk products, we want to be able to integrate these extraction, comparison and quality checking tools into Revit. At the moment we are considering using Dynamo for prototyping the integrated workflow of our stakeholders. 

(And in the end of the project have a plugin for Revit 🙂 )

 

To answer your questions: 

Can you clarify what you are trying to do? Do you want to index some new 'raw' data format that ReCap does not currently recognize?

 

 From the thread it is not clear exactly what you want to achieve.

"

 

The first thing we want to be able to do is to visualize .e57 pointclouds in revit, without having to go through and open them in Recap to transform them into the rcs format.

 

One idea I just had now for this was maybe to be able to access " the separate executable that is launched when you want to insert a file other than RCP or RCS" ('the headless' version of ReCap) through command line. And in this way be able to visualize and link e57 point clouds in Revit with full controle over the files generated and linked to Revit from within Dynamo and python.

Would a command line solution be posible?

Or can you see another way?

Is there an API for Recap?

 

 

To answer:

"

if they can't count on that the points are in the same position as when they scan. Do you know if this is the case?

"

Then I do not know for sure if this is the case. It was a comment I got from one of our stakeholders. But as you write " The answer is that ReCap indexing does not alter point coordinates; they are completely sacred", Then I will take this as the case.

 

Again thanks for your replies and I hope this clarifies what we are trying to achieve. And I hope it sounds interresting from your point of view.

 

Best regards

Henrik Evers

Message 8 of 18
jeremytammik
in reply to: henrikevers

Dear Henrik,

 

Thank you for your answers.

 

Here is some more feedback from the development team:

 

Long term preservation of architectural knowledge sounds interesting and I’m glad Autodesk tools are used for this!

 

As far as I understood, the input format is E57, which ReCap can index and so can Revit (using its standalone indexer).

 

I am puzzled by the client’s desire not to use ReCap for indexing. I would ask if his scans are already “registered”, i.e. unified in one E57 file per building.

 

If so, then I understand his desire to write a scrip to automate E57 to RCS conversion of the large number of files. Our standalone indexer can be used for that; we had this use case in mind from the beginning, although I don’t know if anybody is actually using such workflow.

 

I found the following description:

 

The indexer program is called AdPointcloudIndexer.exe and is located in the Program folder in Revit installation.

 

The command line for the indexer is:

 

AdPointcloudindexer [/batch] [/pluginspath=PathToPluginsFolder] InputFile [OutputFile]

 

Where:

 

  • InputFile: must be specified; all other parameters are optional;
  • OutputFile: If specified is the resulting RCP file from the conversion. If no file is specified, then the resulting file is same base filename as the input file, and placed in the same folder as the input file. If the output file already exists, a prompt will be provided asking the user if they wish to overwrite it or not.

 

/batch causes the following to be true:

 

  • No progress will be reported as the indexer operates.
  • No end of process reporting will be done.
  • If the output file already exists, an error is generated to stderr and the indexing terminated.

 

/pluginspath specifies the folder to look for plugins, default is a folder named “plugins\Point Clouds Codecs” under the folder where the indexer exe resides.

 

Hope this helps.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 9 of 18

Recap's Unification will unify points into a "Grid"

 

I have found that Recap seems slower than the standalone indexer from revit.


We do a lot of pointlcoud work, and recap is too slow compared to revits indexer.

 

 

Message 10 of 18

We confirmed with ReCap developers that ReCap does not change point coordinates to put points on a "Grid".

It does round coordinates to the nearest millimeter (if you use meters as the base units). If this is not what you observe, could you give an example?

Message 11 of 18

The unifacation happens when you export the file out. Not on the indexing.

 

 

Message 12 of 18
henrikevers
in reply to: jeremytammik

Hi Jeremy

 

Sorry for the long time before a response. And thank you very much for your help. Unfortunately I have not been able to make your suggestion for the commandline approach work. 

When I try a dialig pops up saying 'No file AdPointCloudIndexerRes.dll found.'

I have tried to write in /pluginspath=C:\Program Files\Autodesk\Revit 2015\en-US (the path where I could find this, but still says the same)

I have also looked for the “plugins\Point Clouds Codecs” folder without any luck.

I could see that your suggestions came from a post from 2011. Could it be that this is not doable andmore in 2015? or that there is another commandline for it now?

 

Thank you so much for your help.

Best

Henrik

Message 13 of 18
j.mom
in reply to: henrikevers

I Have encountered the same problem. I have u number of raw pointcloud files (in pointcloud.txt file format) that I would like to index into rcs or rcp files programmatically (from a revit plugin). I tried to use the Adpointcloudindexer.exe file in the revit 2015 installation folder via the windows command line providing it with the path of my raw pointcloud.txt filepath, but the message "No file AdpointcloudindexerRes.dll is found. Exiting... " is shown.

 

Can anyone provide a solution? Does it have to do with me using revit 2015?

 

Best,

 

Jesse

Message 14 of 18
jeremytammik
in reply to: j.mom

Hi Henrik and Jesse,

 

Apparently, the only recommended solution nowadays is to use ReCap.

 

Still, searching my hard disk for the DLL you are missing, I see the following in Revit 2016:

 

./Program Files/Autodesk/Revit 2016/AdPointCloudIndexer.exe
./Program Files/Autodesk/Revit 2016/cs-CZ/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/de-DE/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/en-US/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/es-ES/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/fr-FR/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/it-IT/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/ja-JP/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/ko-KR/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/pl-PL/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/pt-BR/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/ru-RU/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/zh-CN/AdPointCloudIndexerRes.dll
./Program Files/Autodesk/Revit 2016/zh-TW/AdPointCloudIndexerRes.dll

I also see the same files in the same relative locations in Revit 2015.

 

So at least the lack of the resource DLL should not be a problem...

 

I hope this helps.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 15 of 18
j.mom
in reply to: jeremytammik

Hi jeremy, thanks for your reply. I located the file and pasted directly into c:/Program Files/Autodesk/Revit 2015 and I at least got the indexer menu that is shown in revit as well when trying to index a raw format. However, when i try to index, I get an onknown error, so I can't get it to work properly.

 

What I'm trying to do is as follows. I'm trying to visualize in a revit model what areas are visible for security cameras. To do so, I create " laserpoints" from the camera's viewpoint using the Revit API in a plugin. These laserpoints are created in the camera's view direction with a given field of view and view depth for that camera, and write the coordinates of these laserpoints in a textfile. this custom created textfile is what i would like to convert to a rcs file and load into my revit project. (Maybe there is a smarter way to show XYZ coordinates in a revit model using the revit API?) 

 

So far, creation of the txt file hasn't been a problem, and manually indexing it and importing it in revit works as well. However, I would like to automate these last steps as wel.

 

I have attached an image that shows the end result. The pink objects represent cameras in my project, and the point clouds (one for each camera) are generated using the revit API (ReferenceIntersector). Each camera has it's own horizontal and vertical field of view angles, view depth and tilt angle. The txt files created by my plugin were then indexed and imported manually.

 

I hope this clarifies what I'm trying to do, and it would be nice if someone has some ideas to achieve it

 

Jesse

 

camera view point cloud3.pngcamera view point cloud.png

Message 16 of 18
jeremytammik
in reply to: j.mom

Dear Jesse,

 

If all of your data can be painted onto the faces of existing objects, as appears to be the case, you can use the analysis visualisation framework AVF instead of point clouds.

 

That creates transient graphics that are not stored in the database.

 

If you want to create persistent geometry, the easiest way to go is to use DirectShape elements.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 17 of 18
orso2006
in reply to: jeremytammik

Jesse:

 

I am writing because I too am very interested in using the standalone Point Cloud Indexer for Revit 2016. I too had to manually copy the 

AdPointCloudIndexerRes.dll

into the same folder as the exe.

 

 

I run the exe as described by the above descriptions, typing the following at the command line:

AdPointcloudindexer [/batch] [/pluginspath=PathToPluginsFolder] InputFile [OutputFile]

I receive the following error message:

"Indexing failed: Unknown error (code 101). Please be sure all add-ins and supporting files are properly installed and that the file being indexed is of the proper format for the chosen codec."

 

I have tried different input file formats such as: E57, PCG, PTS, TXT, XYZ, CSV. All produce the same error message.

 

Have you progressed any further in making the standalone indexer function?

Any thoughts?

 

Daniel

Message 18 of 18
orso2006
in reply to: orso2006

Jeremy:

 

I run the command, as you specified for launching the exe from the command line, and the Point Cloud File Indexing is executed. After execution, the process runs for awhile, longer for larger models, quicker for smaller models, then the original file just disappears. 

 

Do you know what may be causing this? Do you know of any updates to make this feature work in Revit 2016?

 

I am wondering if I need to copy in some windows dll's or Recap dll's, or some other dependencies, to allow this exe to run as a standalone. The documentation on the AdPointCloudIndexer.exe is non-existant. Do you know of any documentation?

 

Thanks for the continued support.

 

DC

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community