Sunday, 15 September 2013

autocad - Missing referencies in VBA: how to "include" modules? -



autocad - Missing referencies in VBA: how to "include" modules? -

i have legacy code - macro autocad - , got running on autocad 2015 enabled vba. there string-related function trim, mid, etc. , these functions missing references, vba can't find definitions. can find them manually in object browser, utilize strings.trim , works. how can avoide adding module name every phone call of function in vba? there include string'?

edited: got compile error "can't find project or library" , here screen shot of references window after message:

and microsoft word library selected default. double-checked, path correct. there no libraries missing prefix (or can't see it). maybe, of them must excluded since legacy code, not sure wild guessing fine in case, maybe there way problem libraries marked?

it possible 1 of references (newer versions of autocad, or more microsoft word) has function or method names matching left, mid, trim , on, didn't exist before. create function names ambiguous. seek selectively removing references see effect on functions, or observe intellisense when typing mid see if has different meaning.

consider writing wrappers string functions. example, write left function internally calls strings.left in module visible functions used.

while doesn't solve problem immediately, allow minimise changes legacy code.

vba autocad

No comments:

Post a Comment