"Expecting object to be local"

"Expecting object to be local"

gerrardhickson
Collaborator Collaborator
8,208 Views
5 Replies
Message 1 of 6

"Expecting object to be local"

gerrardhickson
Collaborator
Collaborator

Hi All,

 

Some time back (years ago) I started getting a new error message when debugging code - that error is "Expecting object to be local".  I usually find that I've done something wrong, but the error message doesn't seem to help or offer any clues as to what the error might be. Some longer time ago, this message didn't seem to exist (at least, I didn't get it).

What does it mean? what should I be looking for when I get it? 

 

Searching the forums doesn't yield any results - it seems to be unique to me somehow.

 

gerrardhickson_0-1676616696600.png

gerrardhickson_1-1676616706585.png

 

Any suggestions?

 

EDIT: I just resolved the error above by saving my assembly document. Go figure...

EDIT 2 : Moments later, I get the same error - but this time it's because I had 'NewAssy' in my replace function, instead of a filename string. 

0 Likes
8,209 Views
5 Replies
Replies (5)
Message 2 of 6

bradeneuropeArthur
Mentor
Mentor

Use this:

NewAssy.FileName

(The "." "Dot" is missing in your code)

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 6

gerrardhickson
Collaborator
Collaborator

No, NewAssyFileName is declared as a string further up the code. I cropped most of it out because I'm not looking for debug help. In trying to understand how what this error message means.

 

In my edits, I was getting the same error for two very different problems. 1) I needed to save the working files and 2) I used an object where I should have used a string.

 

I'll share some code when I'm back in the office. I expect that other users will get a different error message to what I'm seeing.

0 Likes
Message 4 of 6

bradeneuropeArthur
Mentor
Mentor

https://learn.microsoft.com/en-us/office/troubleshoot/excel/run-time-error-2147467259-80004005

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 6

gerrardhickson
Collaborator
Collaborator

Yeah, I've googled it too. The results aren't particularly helpful.

Message 6 of 6

gerrardhickson
Collaborator
Collaborator

I think I've narrowed the problem down to a PC configuration.  I'm messing around with more code this morning on a different machine - then I transferred the code to my main machine to continue working on it, and I got errors on the same line, but the errors are different.

gerrardhickson_0-1677633099823.png

 

Any suggestions?

0 Likes