Hello,
I have a simple question and i expect no for an answer but you never know... We have this form where we can do all sort of things, like filling in the iProperties. The problem is, when i switch to another file, the data in the form doesn't update. Is this possible somehow? That'd be awesome.
Thanks,
Stan.
Hi Stan,
When I create a global form and add iprops to it, it seems to update for each file. Could you edit the form and take a look at how the properties are mapped? Maybe we can dig into this.
Thanks,
Dave
Stan, difficult to analyse your problem without the code.
But i give it a try. I think you're reading the iproperties from the drawing A with some iLogic rule. These values are stored in the memory, when you switch to drawing B this memory stays the way it is because nothing is saying that it must be updated.
You need to rerun a rule for reading the new properties from the now active document. (drawing B).
I hope this helps you a little bit. Otherwise provide your code for some better understanding.
Rob.
Stan,
I misunderstood you earlier. I think Rob's description matches your description of the issue. You want the form data to refresh to whatever file is currently open in inventor. Right now, the data from Drawing A is stuck. If that's true...
I wonder if you could do something along the lines of a button to refresh the data on the form. This button would actually only close the form and run a very short rule which re-opens the form (And gets the data from the currently open item). I realize that's kind of roundabout way of doing it, but as Rob mentions, the data seems to be stuck on whatever document you opened the form in.
Ideally, I think it would be cool to write something in the code that detected that you switched files and stopped the form and restarted it, but I'm not sure if it's possible, nor how to do it, hence my non-ideal suggestion.
I may also be totally off base.
Dave
I made a video of what i ment, please watch it. I couldn't upload it to this forum so i uploaded it to my Dropbox; https://www.dropbox.com/s/gogdpbmxwivp3po/Video.avi?dl=0 .
As you can see i have to re-open the form for the iProperties in the form to update. Is there any way it updates automaticly when I switch to an other drawing?
@dkatz i think you understand me correctly.
Thanks,
Stan
So, I tried my idea out (Spoiler alert: it didn't work). I created a global form and an external rule, so that the references to everything weren't in each part. It still seemed to get stuck on whatever part I originally opened the form in.
I'm thinking that if this is the end game of what you want, then maybe it would be useful to set an object to the current open document in the application and then fill out the form by accessing the iproperties through the document object. Essentially, you'd be writing your own vb form, and having some event trigger the refresh (I'm not sure how that last part would work, though).
Can't find what you're looking for? Ask the community or share your knowledge.