Forums
Forums >> Workflow & Implementation >> API & Third Party Apps >> Need help with Macro program for point cloud visibility
|
|
active
Joined: Wed, Jul 20, 2016
0 Posts No Rating |
Hey everyone. This is my first post, I am new to Revit City. I was hoping I could get someone to help me with a problem.
I am ultimatly trying to create a button or shortcut key to turn point cloud visibility on/off, thats it. I have been playing around with the Macro creator, and have had zero luck figuring it out. I am not a programer, so its basicaly greek to me...
I have tried doing google searches for help, but everything I find assumes you are a programmer so again, it doesn't make sense to me.
I've also tried doing searches for something already written but haven't had an luck there either.
Is there anyone out there that can please write some code to help me do this?
Thanks a bunch!
|
This user is offline |
|
|
|
active
Joined: Mon, Sep 26, 2016
0 Posts No Rating |
Sorry I can't help but I'm ahving the exact same issue, don't understand why Revit wants to make things difficult at every possible occasion. Even cant attach a keyboard shortcut to edit your View Range. Hopefully someone see's this thread soon!
|
This user is offline |
|
|
active
Joined: Sat, Oct 8, 2016
0 Posts No Rating |
I have dealt very little with point clouds. That being said, if you are trying to create a one button click to hide them in a view then try the following:
public void HidePointCloud()
{
var doc = this.ActiveUIDocument.Document;
var view = this.ActiveUIDocument.ActiveView;
FilteredElementCollector pointCloudCollector = new FilteredElementCollector(doc, view.Id).OfClass(typeof(PointCloudInstance));
var pointCloudElements = pointCloudCollector.ToElementIds();
if  pointCloudElements.Count > 0 ) view.HideElements(elements);
}
edit: replace the stupid smiley with a "("
Edited on: Sun, Oct 9, 2016 at 12:20:25 AM
|
This user is offline |
|
|
active
Joined: Mon, Sep 26, 2016
0 Posts No Rating |
Hi RevDev
I'm hopeless with code and don't know where I am meant to copy that text to. I know how to create a new module and macro but when I get to actually writing the command I have no idea what I'm looking at.
Hopefully Dan is still getting updates for this thread as this could save so much time.
|
This user is offline |
|
|
active
Joined: Sat, Oct 8, 2016
0 Posts No Rating |
If you already have a c# macro set up just paste the code into the macro below the line that says "revit macro generated code" and then press f8 to build the new macro. You shouldn't get any errors and after that click the macro manager, press the plus sign next to the name of your macro and click on the remove point cloud module in the view you want to hide the point clouds. Then click run.
If you need more help, just let me know.
|
This user is offline |
|
|
active
Joined: Sat, Oct 8, 2016
0 Posts No Rating |
(double post)
Edited on: Thu, Oct 13, 2016 at 1:45:39 PM
|
This user is offline |
|
|
active
Joined: Sat, Dec 18, 2010
0 Posts No Rating |
if you have a progrmable keypad, keyboard or mouse this should work.
VG, Shift Tab, >, >, >, >, >, Tab, Tab, Tab, Tab, Tab, Space, Tab, Enter
The number of > depends on Local or Central Model
|
This user is offline |
|
|
|
Similar Threads |
Revit 2014 Point Cloud Benefits/limitations? |
Revit Building >> Technical Support
|
Fri, May 24, 2013 at 8:00:13 AM
|
6
|
Point Cloud in Revit 2014 no longer working in Revit 2015 |
Revit Building >> Technical Support
|
Fri, May 15, 2015 at 3:23:06 AM
|
2
|
Revit 2014 Point Cloud Plot Issue |
Revit Building >> Technical Support
|
Fri, Apr 25, 2014 at 8:44:48 AM
|
1
|
Point Cloud location |
Revit Building >> Technical Support
|
Tue, Apr 8, 2014 at 2:23:56 PM
|
6
|
Export the Point cloud file to Auto CAD with Revit |
General Discussion >> Revit Project Management
|
Wed, Apr 2, 2014 at 4:38:32 PM
|
2
|
|
|
Site Stats
Members: | 2037311 | Objects: | 23017 | Forum Posts: | 152210 | Job Listings: | 3 |
|