Home > Software engineering >  Invalid procedure call or argument
Invalid procedure call or argument

Time:09-19

Dim objJPG As AcadRasterImage
FilePath="D: \ L00 \ R00000005 \ C00000004 JPG"
B (0)=600000.590212514
B (1)=100000.327829989
B (0)=0
Factor=50000
The Set objJPG=ThisDrawing. ModelSpace. AddRaster (FilePath, b, factor, 0)

Where is my wrong 0 0

CodePudding user response:

Parameter data types are on the whole

CodePudding user response:

In a 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL

CodePudding user response:

refer to the second floor zhao4zhong1 response:
under the 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL


Uh, uh, uh, I didn't quote the new OCX or DLL

CodePudding user response:

All commented On the Error Resume Next statement, in VB6 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,

CodePudding user response:

Run in the VBA IDE,

CodePudding user response:

The
reference 4 floor zhao4zhong1 reply:
comment out all On Error Resume Next statement, in VB6 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,


Main is my other function inside the set statement no problem running
When parameters change as prompt invalid procedure call or parameter
Development help manual inside parameter values are not legitimate, but the value and function requirements of the parameters and there is no difference between
To set breakpoints can't find the wrong

This is the content of CAD secondary development

CodePudding user response:

This requires you to view the cad object parameters help, this is the third party libraries, not VB standard library,

CodePudding user response:

VBA under the for AutoCAD can
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