Quantcast
Channel: All Revit API Forum posts
Viewing all 66692 articles
Browse latest View live

Sweep - orientation of SweepProfile

$
0
0

When I create a Sweep using API, the SweepProfile is sometimes created with symmetry. I think the profile (CurveArrArray) is created on the "wrong face" of the SweepProfile (created from behind of the profile plan instead of from from ahead of the profile plan). It appears randomly, I think it depends on the path of the Sweep.

Did anyone ever face this problem ?

Thank you in advance.


Re: Access Sheet properties and modify

$
0
0

Hi   that's all I was looking for. Thanks.

Re: Sweep - orientation of SweepProfile

$
0
0

Do you not create the profile yourself?

 

If so, are you not responsible for its orientation?

 

Without looking at your code generating the sweep, it is hard to say anything at all.

 

Re: Exporting Coordination Alerts of multiple models Automatically

Re: Exporting Coordination Alerts of multiple models Automatically

$
0
0

It is a standard Revit Warning, I'm new to programming so I'm not sure what is possible to automate on Revit, can i ran a batch or a script to run on all my models and extract all the errors into a folder ?. 

Get BoundingBoxXYZ as shown in Revit Lookup tool

$
0
0

I am working on getting the placement point of an Elevation View.  I am trying to get the same BoundingBoxXYZ that the Revit Lookup tool displays when the Elevation is inspected. The Images below illustrate what I am finding.

 

This is the basic testing setup.  10'x10' walls, with the lower left inside corner at XYZ 0, 0, 100'. The Center of the green crossing model lines is XYZ 5', 5', 100'. The elevation was placed as close as I could to that intersection. The green box around the elevation indicator  matches to the BoundingBoxXYZ of what the Revit Lookup tool reports.

Plan.jpg

 This is the Revit Lookup tool for the Elevation View.

RevitLookup BoundingBox.JPG

The next two images show attempts at retrieving the BoundingBoxXYZ via the API.

BoundingBoxActiveView.jpg

boundingBox1 is null, attempted to get BoundingBoxXYZ from the ActiveView. This is being run via an updater at time of creation, and the active view is the plan view it is being created in.

BoundingBoxElevation.jpg 

This shows the BoundingBoxXYZ of the elevation from the elevation. This BoundingBoxXYZ is also the same as the CropBox property of the elevation.  This Doesn't match the BoundingBoxXYZ reported via Revit Lookup.

 

So, how can I retrieve the same BoundingBoxXYZ that the Revit Lookup tool retrieves?

Re: Sweep - orientation of SweepProfile

$
0
0

Hi,

I create the profile by myself (really simple, a triangle) : 

 

CurveArrArray CA2 = new CurveArrArray();
CurveArray CAA2 = new CurveArray();
XYZ point1 = new XYZ(0, 0, 0);
XYZ point2 = new XYZ(0, Mpied(4), 0);

XYZ point3 = new XYZ(Mpied(2), Mpied(4), 0);

Line line1 = Line.CreateBound(point1, point2);
Line Line2 = Line.CreateBound(point2, point3);
Line Line3 = Line.CreateBound(point3, point1);

CAA2.Append(line1);
CAA2.Append(Line2);
CAA2.Append(Line3);

CA2.Append(CAA2);

SweepProfile SP = creapp.NewCurveLoopsProfile(CA2);

 

Mpied is a function that transforms meter to foot.

The result is shown in the attached image.

For me, the profile should be on the opposit direction (because "2" is a positive number). Did you ever see this kind of problem ?

It's weird because sometimes, with the same code but with another sweep path, the profile is well positionned.

 

Thank you in advance.

Re: Exporting Coordination Alerts of multiple models Automatically

$
0
0

One part to check is whether the GetWarnings method really does return the alerts you are interested in:

 

https://www.revitapidocs.com/2020/4774613d-600a-e1b5-b5aa-f1ee3b14394c.htm

 

You might be able to check that without any programming using RevitLookup and snooping the results on calling GetWarnings on the current document, assuming the document has some of those warnings activated:

 

https://github.com/jeremytammik/RevitLookup

 

The other aspect is how to automate running it in a batch process o all your documents.

 

Several possible approaches are covered in the topic group on the Idling event and driving Revit from outside:

 

Search for 'batch'.

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28

 

If you are new to programming, there are a lot of things you ought better do before getting started with this project.

 

Look at the getting started material, read the recommendation on getting started and before getting started, work through the tutorials, etc.:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

Good luck and have fun!

 

Best regards,

 

Jeremy

 

 

 


Re: Exporting Coordination Alerts of multiple models Automatically

$
0
0

Thank you Jeremy, You're awesome.

How to work with the BrowserOrganizationForViews

$
0
0
I want to get the "Filtering" and "Grouping and Sorting" properties from the BrowserOrganizationForViews object but I can't figure out what's what in the object properties. If they are available at all! I can only find the properties for SortingParameterId and SortingOrder, but there are a lot more in the "Browser Organization Properties"-dialog. Can anybody help me find the rest of the properties and show how to use them to figure out the structure of the Project Browser? Thanks!

Re: Sweep - orientation of SweepProfile

$
0
0

And to finish the code :

 

Sweep extr_chemin = factory.NewSweep(true, CA1, sketch, SP, 0, ProfilePlaneLocation.Start);

 

CA1 is the path and "sketch" the plane in wich it's drawn.

Re: Sweep - orientation of SweepProfile

Re: Get BoundingBoxXYZ as shown in Revit Lookup tool

$
0
0

Upon closer examination, the element displayed in plan view is a different element than the Elevation View.  The ElementId is off by 1.  The Elevation View in the Project Browser is the elevation that I access via the API.  What then is the elevation that is displayed on the plan?

Re: Sweep - orientation of SweepProfile

$
0
0

Hi,

I realized my profile was well placed. I think the problem comes from a part of my code that analyses if the curve loop (CurveLoop) representing my path is clockwise or not, using IsCounterclockwise compared to a point inside the loop. I think it's not working as I desire.

Anyway, thank you for the fast reply.

Re: Sweep - orientation of SweepProfile

$
0
0

I found the issue ! It was because of the function IsCounterclockwise that I was not using right.

Now my Sweep works fine 😄

Thank you for your help @ jeremytammik 


Re: Get BoundingBoxXYZ as shown in Revit Lookup tool

$
0
0

I am not familiar with how this object is referenced in the API, but the bounding box that you are snooping with the lookup tool is probably the arrow (the annotation itself). There may be a better way to do this, but I believe that you can pull the ViewSection object from the arrow element via the GetDependentElements() method.

 

That being said, the placement point that you are looking for might actually be the Location property of the ElevationMarker that the ViewSection was created from. In your example, the ElevationMarker is the circular marker. Hopefully someone else can expand upon this, but I believe that the origin of the transform of the BoundingBoxXYZ of the ViewSection is not really related to the placement point of the ElevationMarker object.

Addin Beta Versions

$
0
0

Hi, I'm developing a plugin for Revit and I wonder how to distribute it as open beta.

Is it a good idea to publish it on Autodesk App Store as freeware and make a paid version later?

 

Thanks for your opinions and suggestions

Re: Addin Beta Versions

Re: How to work with the BrowserOrganizationForViews

How to Access Pipe Dimension Reference Point

$
0
0

When i create pipe dimension, references were found near the point of the connectors.

But i don't know how to access that references by revit api.

Presumably, that references are not geometry elements.

I'm waiting for your help, thanks.

 

Screenshot_01.pngScreenshot_02.pngScreenshot_03.png

 
Viewing all 66692 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>