Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Strange Code Behavior. Rough Draft Does No Longer Works.

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
npetulla
719 Views, 4 Replies

Strange Code Behavior. Rough Draft Does No Longer Works.

My Co-Worker and I wrote a pretty intensive code for a dockable panel that presents buttons to load and place specific .rfa content (Valves, Heating Units, Boilers, Ect.)(for Revit 2022 - 2024). I finished the rough draft for the panel and everything was working about 1.5-2 weeks ago. I had to take time off for a family matter, and I go to review my work today and to do some more testing and everything has stopped working: my buttons do not load into my panel anymore and lose all functionality for loading and placing. I know all of my files haven't changed because I compared my solutions codes to my personal backups and there are no differences. 

 

We use C# for 99% of our tools we make. 

 

Things I have tried: 

1) References:  I have the correct years Revit API and APIUI .dll files for each year I test in. 

2) Compare codes for differences(I thought I may have forgot to save.)

3) Modifying code (Multiple ways and Iterations.)

4) Brand new GUID for the panel. 

5) Clean and rebuild Solution. 

 

I have only been doing Revit API for about a year. And only started learning to code a little over a year ago also. I have learned a lot and I see my work improving with each tool I create. I apologize for sounding a bit wacky, but I wasn't expecting this at all. 

 

Has anyone had this happen to them before? 

 

Thank you for your time and Have a great day!

-Nicholas 

4 REPLIES 4
Message 2 of 5
ctm_mka
in reply to: npetulla

oh yes. check with you IT department, see what patches/updates have been applied since you were gone. i've had code break due to a windows update. only thing you can really do is debug piece by piece.

Message 3 of 5
npetulla
in reply to: ctm_mka

Darn. Alrighty then, If I find the root of the problem then I will be sure to share it. Thank you Again!

 

Message 4 of 5
TripleM-Dev.net
in reply to: npetulla

Hi @npetulla,

 

So only the buttons no longer show on the panel, but the panel itself does load.

And because the buttons are no longer visible none of the code functionality can be used.

 

Are you using the same PC/Screen/(high)DPI setting in windows, as before, as no code is changed it might be the buttons are no longer "in View", but do exist on panel..., Check how the buttons are anchored and/or their size.

Message 5 of 5
npetulla
in reply to: npetulla

I found the issue. It was with not all of the rfa files having an image associated with it. So some of the buttons would be created but then the code would fail. it was causing the code to fail but not show me the error in revit or in visual studio.(Im guessing because of some updating I did before I had to take time off.)My solution is to incorporate a default image if there is not one present. 

Thank you again to everyone who helped me with my issue. This community is so awesome! Have a Great day guys!!!

-Nick

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report