Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic form

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
906 Views, 10 Replies

iLogic form

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.

10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

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

Message 3 of 11
Anonymous
in reply to: Anonymous

I will do that, but I doubt you understand me correctly. This is what I do:
- open two drawings; A and B
- I goto drawing A and open a global form with iProperties
- I don't close the global form and go to drawing B
- my global form iProperties don't update (they still display the iProperties from drawing A)

If they do update that way on your Inventor, i could send you a screenshot of my form mapping.

Thanks,
Stan
Message 4 of 11
VdVeek
in reply to: Anonymous

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.

 

Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
Message 5 of 11
Anonymous
in reply to: VdVeek

Sorry but you don't understand me correctly. Maybe it's because of my English. I'm having holidays currently, when I'm back at the office i will make some screenshots of what i mean.

Thanks,
Stan
Message 6 of 11
Anonymous
in reply to: Anonymous

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

Message 7 of 11
Anonymous
in reply to: Anonymous

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

Message 8 of 11
Anonymous
in reply to: Anonymous

d182284 is my school account, accidentally signed in on it.
Message 9 of 11
Anonymous
in reply to: Anonymous

Anyone?
Message 10 of 11
Anonymous
in reply to: Anonymous

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).

Message 11 of 11
Anonymous
in reply to: Anonymous

I think you're right. I don't have the time to look in to Visual Basic, maybe later i have. So untill then it is how it is! Thank you for looking in to it.

Stan.

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

Post to forums  

Autodesk Design & Make Report