Discussion:
Inventor memory (cache?)
(too old to reply)
bkline
2005-03-17 20:58:13 UTC
Permalink
I have almost completed an application where I copy a file from a default drive to a specific path of my active project assembly. I have it set up that each time it copies and saves as it automatically assigns a new number for the part file. What I am running into is if i delete the first part file (say it wasn't what I needed) for some reason the code will fail... It looks to me as though the assembly is keeping a reference to that fist file. I have to close my assembly model and re-open for everything to start working again... I am assuming that I am removing the reference to the part when I am closing the assembly. I have tried to update, rebuild, clear etc. Would anyone have a guess? I assume IV has an internal cache... Can I clear it? How?

Thanks,
Bill
Sanjay Ramaswamy (Autodesk)
2005-03-17 21:23:08 UTC
Permalink
Bill,

Please see the post titled "Remote part does not delete from object (!?)" on
3/14/2005. Seems like a related issue.

Sanjay-
Post by bkline
I have almost completed an application where I copy a file from a default
drive to a specific path of my active project assembly. I have it set up
that each time it copies and saves as it automatically assigns a new number
for the part file. What I am running into is if i delete the first part file
(say it wasn't what I needed) for some reason the code will fail... It looks
to me as though the assembly is keeping a reference to that fist file. I
have to close my assembly model and re-open for everything to start working
again... I am assuming that I am removing the reference to the part when I
am closing the assembly. I have tried to update, rebuild, clear etc. Would
anyone have a guess? I assume IV has an internal cache... Can I clear it?
How?
Post by bkline
Thanks,
Bill
bkline
2005-03-21 15:23:50 UTC
Permalink
Teun,

Thank you for your response. I read the thread that you referenced and I kind of understand. The part that confused me was where it states "one workaround would be to open and close an unrelated document" by unrelated document does it mean another part file in the project? or do I have the code close then re-open my assembly? Also after reading the thread it gave me an idea, I thought if I cleared the undo. it might work the same... I found out that I cleared the undo but, it did not clear the reference to the parts that were no longer there... Could you clarify the open/close thing?

Thanks,
Bill
Sanjay Ramaswamy (Autodesk)
2005-03-21 17:50:59 UTC
Permalink
The document that you would open and close would be one that is unrelated to
the currently open assembly. Also, clearing the undo stack will not help in
this case.

Sanjay-
Post by bkline
Teun,
Thank you for your response. I read the thread that you referenced and I
kind of understand. The part that confused me was where it states "one
workaround would be to open and close an unrelated document" by unrelated
document does it mean another part file in the project? or do I have the
code close then re-open my assembly? Also after reading the thread it gave
me an idea, I thought if I cleared the undo. it might work the same... I
found out that I cleared the undo but, it did not clear the reference to the
parts that were no longer there... Could you clarify the open/close thing?
Post by bkline
Thanks,
Bill
bkline
2005-03-21 20:07:18 UTC
Permalink
Sanjay,

My apologies, I thought you were Teun... Anyway... that worked. I hate to ask but why does my browser bar turn off?

Thanks,
Bill
Sanjay Ramaswamy (Autodesk)
2005-03-21 20:29:12 UTC
Permalink
No problem, Bill. Not sure why that happens. Could you provide some
simplified steps to reproduce the problem?

Sanjay-
Post by bkline
Sanjay,
My apologies, I thought you were Teun... Anyway... that worked. I hate to
ask but why does my browser bar turn off?
Post by bkline
Thanks,
Bill
bkline
2005-03-21 21:43:10 UTC
Permalink
Sanjay,

I have my code written in a user form. On my cmdApplyClick I added code to open a part file then re-close it. Which is what I believe you stated to do... and it worked for clearing the Memory/undo. As I step thru the code the part file opens with the first line of code the second line closes the part file, at that time by browser bar turns off. It's weird... my company had some outside programming done as well and oddly enough it turns the browser off as well, I assumed its just something that happens...(I know... goofy assumption)...

Bill

Continue reading on narkive:
Loading...