Line is too short

Line is too short

Anonymous
Not applicable
5,429 Views
10 Replies
Message 1 of 11

Line is too short

Anonymous
Not applicable

Hi,

 

How do I suppress the error which says can;t be ignored like line is too short.

 

Thanks & Regards

Sanjay Pandey

0 Likes
5,430 Views
10 Replies
Replies (10)
Message 2 of 11

jeremytammik
Autodesk
Autodesk

Dear Sanjay Pandey,

 

Please take a look at the Failure API:

 

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

 

More importantly, please always perform a minimal search before posting questions!

 

Thank you!

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 11

Anonymous
Not applicable

 

This is not the first time that I have used the Failure Processing Api. This time the type of severity of the failure is Error can't be ignored. I also Google Searched "Revit Api Failure Processing error can't be ignored" , "Revit API error can;t be ignored" "Revit api handling warnings" but couldn't find. 

 

Before posting I tried:

foreach (FailureMessageAccessor fma in fmas)
{

   failuresAccessor.DeleteWarning(fma);

}

 

and 

 

foreach (FailureMessageAccessor fma in fmas)
{

   failuresAccessor.DeleteAllWarnings();

}

 

and

 

foreach (FailureMessageAccessor fma in fmas)
{

   failuresAccessor.DeleteElements(fma.GetFailingElementIds() as IList<ElementId>);

}

 

but couldn't get rid of the dialog "Line is too short. Error can't be ignored"

 

Thanks & Regards

Sanjay Pandey

 

0 Likes
Message 4 of 11

jeremytammik
Autodesk
Autodesk

Dear Sanjay Pandey,

 

Thank you very much for all your research so far.

 

There was no way to tell from your question that you had explored anything at all yet.

 

I would suggest that you explore the failure processing functionality a bit further.

 

I believe that the code snippets you  provide are attempting to post-process.

 

You can also set up a pre-processor, or something like that, which gives you much more complete control.

 

I believe, not having done it myself.

 

I also believe that other previous threads here in this forum do address and resolve similar issues.

 

Maybe Arnošt will jump in and help out...

 

Actually, though, taking another look at the links I already pointed you to, I am pretty sure the answer is already given and your research is not yet complete.

 

Please let us know how you end up resolving this to simplify things for the next researcher.

 

Thank you!

 

Best regards,

 

Jeremy



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

0 Likes
Message 5 of 11

Anonymous
Not applicable

Sure, I will take another dip in the link provided by you and explore furthur.

 

BTW a little offbeat but yet. How do I approach Autodesk if I have something developed something substantial.

 

Thanks and Regards

Sanjay Pandey

0 Likes
Message 6 of 11

Revitalizer
Advisor
Advisor

Dear sanjayman,

 

you can suppress those warnings by avoiding to trigger them 😉

 

RevitAPI.chm says in the section of the Line.CreateBound method exceptions: "Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance)."

So just compare the proposed length with that value before trying to create a Line.

 

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 7 of 11

pteague
Advocate
Advocate

@Revitalizer wrote:

you can suppress those warnings by avoiding to trigger them 😉

 


Lol.  Thanks for the in-depth explanation.  🙂

0 Likes
Message 8 of 11

avpBS7DE
Contributor
Contributor

Hello Jeremy,

I build curve arrays with points that are unique up to the 9th decimal of a foot (which is the tolerance Revit API uses).
Today I got this error, in a curve array of 8 points/8 edges. These below are my data.

Did anything change in RevitAPI recently to cause this ? (my code has not changed, and was used every day for 2 months)

thank you for your kind response,
Angelo

INFO - sorted points by angle (deg) 
INFO - (371.320439699, -78.201695538, 0.526725415) (11.781910) 
INFO - (353.310056393, -77.090667510, 0.526725415) (161.274077) 
INFO - (349.881316229, -80.166218966, 0.526725415) (180.288841) 
INFO - (358.067891914, -80.670617892, 0.526725415) (187.807026) 
INFO - (358.067854095, -80.671231706, 0.526725415) (187.815310) 
INFO - (366.254391961, -81.176244447, 0.526725415) (345.189149) 
INFO - (366.254429780, -81.175630632, 0.526725415) (345.197388) 
INFO - (374.440967647, -81.680643372, 0.526725415) (352.661423) 

0 -> 1 ((371.320439699, -78.201695538, 0.526725415) -> (353.310056393, -77.090667510, 0.526725415))
1 -> 2 ((353.310056393, -77.090667510, 0.526725415) -> (349.881316229, -80.166218966, 0.526725415))
2 -> 3 ((349.881316229, -80.166218966, 0.526725415) -> (358.067891914, -80.670617892, 0.526725415))
3 -> 4 ((358.067891914, -80.670617892, 0.526725415) -> (358.067854095, -80.671231706, 0.526725415))
error -> line is too short

 

0 Likes
Message 9 of 11

Revitalizer
Advisor
Advisor

Hi,

 

as mentioned above,

ShortCurveTolerance 0.0025602645572916664

 

SCT.png

 

 

 

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 10 of 11

Anonymous
Not applicable

Hi, first of all, you should avoid the errors but if it is impossible, you could use this

Capture.PNG

This will resolve the error automatically by using default resolution type. In your case it will just skip (I suppose)

0 Likes
Message 11 of 11

klkl12234
Advocate
Advocate

Hello. Did you solve it?
I have the same problem.