VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

addtable and mdb

3 REPLIES 3
Reply
Message 1 of 4
mhardine
363 Views, 3 Replies

addtable and mdb

I've been using the ado_lisp method to create a table and populate it from an access database with mixed results. Does anyone have a VBA routine to create a table to share or a good source of information? Pulling from a Database would be a bonus. I've been searching for a couple of days and haven't found a good source of info so now I'm begging!

3 REPLIES 3
Message 2 of 4
mhardine
in reply to: mhardine

Now I'm struggling with creating an insertion point for the table. I'm using:

 

 

varPnt = ThisDrawing.Utility.GetPoint(Prompt:="Pick Insert Point:")
Set Table = ThisDrawing.PaperSpace.AddTable(varPnt, RowCount, Numcolunas, 0.25, 1.2)

 

BUT I get

 

 Run-time Error -'2145320928 (80210020)'

User Input is a keyword

 

and when I choose Debug the line varPNT = ..... is highlighted.

If I ignore and hit the RUN button and switch back to the drawing window the prompt is there and after selecting an insertion point the table is inserted perfectly.
Does anyone know what causes this and how to correct?

Message 3 of 4
junoj
in reply to: mhardine

I have no problem running this:

 

varPnt = ThisDrawing.Utility.GetPoint(Prompt:="Pick Insert Point:")
Set Table = ThisDrawing.PaperSpace.AddTable(varPnt, 5, 5, 0.25, 1.2)

 

Message 4 of 4
mhardine
in reply to: junoj

Wound up with this:

 

ThisDrawing.Utility.InitializeUserInput 1
v = ThisDrawing.Utility.GetPoint(, vbCrLf & "Pick a corner point: ")

varPnt1(0) = v(0)
varPnt1(1) = v(1)
varPnt1(2) = v(2)

Set table = ThisDrawing.PaperSpace.AddTable(varPnt1, RowCount, Columns, 0.25, 1.2)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost