Home > Software engineering >  Turn a CAD VBA weird problem
Turn a CAD VBA weird problem

Time:09-18

Problem description:
Code written in CAD VBA Enabler, containing module and a few window, code file is by CAD installation folder acad. The DVB
I usually after each update code, the document on the computer in the company and their computers to, also can't remember the first created in that version,
To own a computer use cad 2014, the company in 2008 and 2004, and three to copy each other all can go through the normal run,
Later by the acad. Kao DVB files to another computer, each load macros, cad will collapse, directly display "memory not to read * * * * * * * *"; On the other two computers are normal operation,
This is just a manual loading situation, if the support in LSP file automatically loaded, cad start direct collapse,
Cad uninstall reshipment, problems still,
If, however, from the new cad from 0 to start code, by generating acad. DVB file, everything is normal,
In one version of cad, the same problem; No problem with the new code, once the use of source code files, breakdown and repair immediately,

The feeling is that the file itself or the system itself, the error code written to the registry,
In their new computer to use the code file, probably to copy the code words, derived form file, manually loading the new again, after this still worry about the problem of generality,

Excuse me each a great god, and what the problem is the cause,

CodePudding user response:

1. You "another computer", CAD version is consistent with those of the "normal" computer?
2. Could it be that this "document formats in different versions of" cannot be fully compatible with?
3. Is there may be some code in different versions of "nuance" cause operation error?

CodePudding user response:

reference 1st floor Chen8013 response:
1. Your "another computer", CAD version is consistent with those of the "normal" computer?
2. Could it be that this "document formats in different versions of" cannot be fully compatible with?
3. Is there may be some code in different versions of "nuance" cause operation error?



Office 2008/2004 laptop notebook 2014 B 2014 uninstall reshipment 2008 to uninstall reshipment 2007
Feeling and version, notebook A 64, 2014 and two 32-bit office 08/04 version completely compatible with each other

Laptop B started will collapse is 2014 instead of 2008 version, is arguably nuances code there won't be affected,,,

CodePudding user response:

Baidu search relevant keywords,

CodePudding user response:

reference zhao4zhong1 reply: 3/f
baidu search relevant keywords,

However, and no relevant information,,,

CodePudding user response:

On the "wrong" on the computer, oneself tracking code execution,

PS: many novice in the code, everywhere "On the Error Resume Next"!
Want me to say: it is not "scientific attitude"!!!!!!
I write VB/VBA code, can say never On Error Resume Next, only On Error Goto XXXX!!!!!!

CodePudding user response:

reference 5 floor Chen8013 reply:
on the "wrong" on the computer, oneself tracking code execution,

PS: many novice in the code, everywhere "On the Error Resume Next"!
Want me to say: it is not "scientific attitude"!!!!!!
I write VB/VBA code, can say never On Error Resume Next, only On Error Goto XXXX!!!!!!


Possible problem description is not clear
The problem, I think not code but software haven't collapse load process code execution yet, they hung up in the process of loading ~
Words, general VBA CAD drawing there are a lot of determination figure file blocks the presence or absence of code, all change on error goto, workload more troublesome... Or a resume next convenient ~

CAD code check the error actually is very simple, code execution painted drawing size is wrong, see at a glance... If completely after drawing measurement precision, the code almost 99.9% sure, some places most efficiency almost ~

CodePudding user response:

All commented On the Error Resume Next statement, running in the VBA IDE,
The error and then click the debugging, the cursor will stop error in the statement,
Or
In doubt may have a logical error statements in advance to set breakpoints, run through the breakpoint interrupt,

At this point can be used in the immediate window
? The variable name
Or
? The function name () function parameter
Or
Process (parameters)
Auxiliary debugging,
  •  Tags:  
  • VBA
  • Related