Hidding scans in PointCloudInstance

Hidding scans in PointCloudInstance

SONA-ARCHITECTURE
Advocate Advocate
1,022 Views
5 Replies
Message 1 of 6

Hidding scans in PointCloudInstance

SONA-ARCHITECTURE
Advocate
Advocate

Hi,

 

PointCloudInstance can return the list of scans by using GetScans().

I'd like to put on invisible a specific scan of a pointcloudInstance in my 3DView.

The ReviAPIDOC says : "PointCloudOverrideSettings - Used to get or set the visibility, color mode, and PointCloudColorSettings for a PointCloudInstance or one of its scans." I can't find how to do it.... Could you help me please?

 

Thx

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes
Accepted solutions (1)
1,023 Views
5 Replies
Replies (5)
Message 2 of 6

jeremytammik
Autodesk
Autodesk

Dear Agence,

 

Can you achieve what you want manually through the user interface?

 

If so, please do so and then analyse the model using RevitLookup.

 

You should be able to determine what properties are modified and how.

 

If it cannot be achieved through the user interface, then it is probably not possible programmatically either.

 

Just looking at the help documentation, I see a couple of useful classes, e.g.:

 

PointCloudColorSettings -- http://www.revitapidocs.com/2017/ea2c868b-1091-846a-5142-55f7f27a8d08.htm

 

For different color modes (PointCloudColorMode), the color settings mean different things:

 

  • for single color, color1 means the display color
  • for other modes (intensity, elevation), color1 and color2 form a gradient from min to max
  • for no overrides and normals, color1 and color2 are not used

 

PointCloudColorMode -- http://www.revitapidocs.com/2017/12e4d06d-3d5f-53d6-7be9-97bed63ec47b.htm

 

Maybe, to make a scan invisible, you can set the colour mode to 'intensity' and set both min and max to zero.

 

As said, the best way to find out is to do it manually and analyse the resulting model properties using RevitLookup.

 

I hope this helps.

 

Cheers,

 

Jeremy

 

P.S. Also answered The Building Coder comment:

 

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

 



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

Message 3 of 6

SONA-ARCHITECTURE
Advocate
Advocate

Jeremy

 

Many thx for answering me.

Yes, I can put on invisible the rcs from a rcp instance, have a look on the capture joined.

I can use GetScans() and return the list of all rcs drom my rcp instance.

With LookUp, no way to get the ids of all .rcs...

 

And the help says :

 

Scans

An .rcp file can contain multiple scans. The method PointCloudInstance.GetScans() returns a list of scan names which can be used to set visibility and fixed color overrides independently for each scan in the PointCloudInstance. PointCloudInstance.ContainsScan() indicates whether the given scan name is contained in the point cloud instance while PointCloudInstance.GetScanOrigin() will return the origin of the given scan in model coordinates.

 

"PointCloudColorSettings - Used to assign specific colors for certain color modes to a PointCloudInstance element, or one of its scans. Does not apply if the PointCloudColorMode is NoOverride or Normals. "

But how to access the rcs id ?


Capture.JPG

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes
Message 4 of 6

jeremytammik
Autodesk
Autodesk

Question: is the RCP instance one single Revit database element?

 

If so, are the RCS objects internal sub-objects. and not individual database elements?

 

If so, they have no individual element id, and the only way to access them is via the main RCP element...

 

I'll check with the development team for you.

 

Cheers,

 

Jeremy



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

0 Likes
Message 5 of 6

SONA-ARCHITECTURE
Advocate
Advocate
Accepted solution

Hi Jeremmy!

 

Thx for answering.

I'md done, it works!

Here is the post

 

I use :

PointCloudOverrideSettings ptc_overridesettings_invisible = new PointCloudOverrideSettings();

and also this code :

ptc_overrides.SetPointCloudScanOverrideSettings(pti.Id, ptc_overridesettings_invisible, scanname,doc);

 

Many thx!!

 

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
Message 6 of 6

jeremytammik
Autodesk
Autodesk

Dear Pierre,

 

Thank you very much for sharing your solution!

 

I promoted this thread to a blog post for future reference:

 

http://thebuildingcoder.typepad.com/blog/2017/09/download-from-revit-server-and-hide-a-point-cloud-s...

 

Cheers,

 

Jeremy



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

0 Likes