Import of C++ dll and access to Revit point cloud class


#1

Hi

I am from an architectural research center, CITA (Centre for IT and Architecture) at the school of architecture in Copenhagen, and we are working on a EU funded research project (duraark.eu), which among other things deals with 3d scanning and point cloud analysis. We are very interested in being able to build our point cloud components through dynamo and python, to be able to test our prototypes directly within the workflow of our stakeholders, e.g. architects. And I have a few questions that one of you might be able to help me with, to get us started

 

How should a C++ dll be managed to be able to call it from within python/dynamo? And how would this be done?

Is it possible to access the pointCloud class in Revit through python/dynamo? And how would this be done?

 

Hope you can help me out

And thanks very much in advance


#2

Hi Henrik, for both queries you made I advice you to start with this page from github: https://github.com/DynamoDS/Dynamo/wiki

API is accessible with python nodes, so PointCloud Class is available. looking forward seeing your progress!

 


#3

Hi Julien

Thanks for your answer. I will definitely look into the wiki you sent me. great :slight_smile:

About the Revit API, then I have never tried to work with this. Either in python or dynamo or anywhere else. So if you have some directions or examples on how to work with this and especially the point clouds, then that would be really helpful?

thanks


#4

Maybe a more specific phrased question.

If I have a point cloud file, could be a .e57. How do I import it into Revit, handle it and eventual maybe erase it again from within Dynamo/python?

Thanks

Henrik


#5

Hi Henrik,

At the moment Dynamo doesn’t have any easy way to import a .e57 point cloud file. If the points are in an easy to parse format, such as a text file with sets of three floats, you could read it in and parse it using a Python file. That said, Dynamo’s current Point implementation is very “heavy weight”, meaning you won’t be able to make hundreds of thousands of Points without running into trouble.

I’ve added a user story to our backlog covering importing and displaying pointcloud data such as e57


#6

Hi Henrick,

Taking your second question, it looks as though you can load an .e57 point cloud file using Revit API, see http://help.autodesk.com/view/RVT/2014/ENU/?guid=GUID-B80DBCF1-56A8-4864-A0CD-181466E0EDE8 for a place to start.

That allows you to create a Point Cloud Type and Instance within the Revit model, and interrogate the cloud for it’s point data. All possible from Revit API using C# or VB#.

In my experience of Python nodes in Dynamo, all the Revit API is available to you automagically via reflection. But, regarding Patrick’s answer, that may not be true in this case. I tend to start by testing things in C# using Macros inside Revit; then perhaps try in RevitPythonShell direct; then see if the same Python code works inside Dynamo.

Depends what you’re trying to do with the PointClouds once you have them loaded into Revit: What are you planning to do with them from Dynamo?

Cheers