API giving incorrect information on load?

API giving incorrect information on load?

joshuapX9LJM
Observer Observer
161 Views
1 Reply
Message 1 of 2

API giving incorrect information on load?

joshuapX9LJM
Observer
Observer

Hi all, I've been having this weird issue with one of my applications I'm developing. Right now I am accessing all sheets in a document and grabbing dimensions on the sheets including those in view ports. From here I am checking the value of the strings to verify the displayed value matches the actual value but the displayed value and actual value are completely different from each other. The only fix to this is clicking the dimension and then re running the app which fixes the issue. 

 

After installing Revit lookup I noticed that when searching by ID the value is still wrong when the document first opens. Then when clicking the dimension and looking it up again, the value completely changes. Not sure why this is happening but thought I'd see what your thoughts or fixes are for this issue. 

 

Thanks

0 Likes
162 Views
1 Reply
Reply (1)
Message 2 of 2

ctm_mka
Collaborator
Collaborator

That is indeed wierd. My only thought is that the view you are looking at is not active at first, thus the incorrect value (perhaps its scaling to model view from the sheet?). Anywho, try a doc.Regenerate() right after opening.

0 Likes