Invalid Number of references

Invalid Number of references

GeomGym
Advocate Advocate
2,454 Views
7 Replies
Message 1 of 8

Invalid Number of references

GeomGym
Advocate
Advocate

Hi,

 

I'm trying to add some constraint dimensions inside an extrusion profile from the api.

I get an exception about an invalid number of references (I assume this is like many revit api exceptions and actually indicating a different problem).

 

I've attached some sample code.  Adding a radial dimension inside a circular profile works fine.

 

Run the attached with a generic model template open in a level (plan) view.

 

Thanks in advance,

 

Jon

0 Likes
Accepted solutions (2)
2,455 Views
7 Replies
Replies (7)
Message 2 of 8

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Jon,

 

Thank you for your report.

 

I logged the issue REVIT-94729 [API invalid number of references adding constraint in extrusion -- 11954635] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.

 

This issue is important to me. What can I do to help?

 

This issue needs to be assessed by our engineering team, and prioritised against all of the other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:

 

  • Impact on your application and/or your development.
  • The number of users affected.
  • The potential revenue impact to you.
  • The potential revenue impact to Autodesk.
  • Realistic timescale over which a fix would help you.
  • In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.

 

This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 8

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Jon,

 

Thank you again for your report.

 

The development team analysed and responded to the issue REVIT-94729 [API invalid number of references adding constraint in extrusion -- 11954635] that I raised for this on your behalf and closed it as 'Code Fix Needed'. The fix is scheduled for the next major release of Revit.

 

They say: The exception "invalid number of references" is thrown from the NewDimension API call. Apparently the two curve references are treated as invalid here.

 

Sorry it will take a while, and thank you for your patience.

 

Best regards,

 

Jeremy



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

0 Likes
Message 4 of 8

jeremy_tammik
Alumni
Alumni

Dear Jon,
   
The code fix ticket that the development team submitted is REVIT-95003 [[API] Invalid number of references adding constraint in extrusion -- 11954635]. Please make a note of this number for future reference.

   

Working on that, they report: loading the plugin you provided in Revit, the command cannot be executed; the transaction fails. It seems that changes need to be made to the source code in your project to make the command work. Alternatively, can you provide a specific .RVT file for me to reproduce the problem?

     

Thank you!

   

Best regards,
  
Jeremy

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 8

jeremy_tammik
Alumni
Alumni

external_command_failure.png

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 6 of 8

jeremy_tammik
Alumni
Alumni

Hey Jon, the development team are waiting for a response... Thank you!

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 7 of 8

GeomGym
Advocate
Advocate

As per the report, if you open a generic model family template, have a plan view active, and run the command.

I also get the command failure after an exception, having updated the test code for Revit 2021 (I didn't test other versions).

 

I don't see this issue as critical to my addins, it was reported nearly 8 years ago.  I never saw any interim suggestion it was fixed and the behaviour seems the same now as when I reported it originally.  

 

Thanks,


Jon

0 Likes
Message 8 of 8

jeremy_tammik
Alumni
Alumni

Just FYI, REVIT-95003 [Invalid number of references adding constraint in extrusion -- 11954635] has now been closed by the development team as "Cannot Reproduce".

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes