| |

VerySource

 Forgot password?
 Register
Search
View: 757|Reply: 1

How to make the Set parameter in the class block appear True in the form

[Copy link]

2

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-4 11:50:01
| Show all posts |Read mode
I now have a program in a class module:

Function AutoCADConnect () 'Connect AutoCAD
On Error Resume Next
Set obj_Acad = GetObject (, "autocad.application")
If Err Then
   Err.Clear
   On Error Resume Next
   Set obj_Acad = CreateObject ("autocad.application")
   If Err Then
      Err.Clear
      MsgBox "Cannot run AutoCAD, please check if it is installed!", VbOKCancel, "Warning!"
      Exit Function
      End If
End If
obj_Acad.Visible = True
Set obj_Doc = obj_Acad.ActiveDocument
Set obj_ModelSpace = obj_Doc.ModelSpace
'MsgBox "End of operation!", VbOKOnly, "Project 1!"
boo = True
End Function

The question for you heroes is how to put the data in the following class modules
obj_Acad
Set obj_Doc
Set obj_ModelSpace
How to achieve the form in VB
debug.print obj_Acad --------> True
debug.print Set obj_Doc --------> True
debug.print Set obj_ModelSpace --------> True
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-4 23:18:01
| Show all posts
???
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list