.NET

Reply
*Terry W. Dotson
Message 11 of 16 (76 Views)

Re: Excel to AutoCAD Table

03-06-2006 02:05 PM in reply to: *Nate Hunter
Nate Hunter wrote:

> I am also using VBA.

Then your posting in the wrong group!

Terry
*Nate Hunter
Message 12 of 16 (76 Views)

Re: Excel to AutoCAD Table

03-07-2006 06:07 AM in reply to: *Nate Hunter
I realize I am posting in the wrong group. the program started out in .Net
but once I could only find someone who is writted in VBA I switched over for
example purposes. This is the only group that I have found any information
about working with tables. My intent is to move my code into .NET when I am
finished finding out what I need to do.

So any ideas what my problem may be?


"Terry W. Dotson" wrote in message
news:5103098@discussion.autodesk.com...
Nate Hunter wrote:

> I am also using VBA.

Then your posting in the wrong group!

Terry
Distinguished Contributor
Mikko
Posts: 212
Registered: ‎10-03-2003
Message 13 of 16 (76 Views)

Re: Excel to AutoCAD Table

03-07-2006 11:01 AM in reply to: *Nate Hunter
Dim acadMoS As IAcadModelSpace2 = acadDoc.ModelSpace
Dim pt(2) As Double
pt(0) = 5.0
pt(1) = 5.0
pt(2) = 0.0
Dim MyTable As AcadTable
MyTable = acadMoS.AddTable(pt, 5, 5, 1, 2)
Dim cr As AcadAcCmColor
cr = AcadApp.GetInterfaceObject("AutoCad.AcCmColor.16")
cr.SetRGB(255, 255, 0)
MyTable.SetCellBackgroundColor(3, 2, cr)
MyTable.SetCellBackgroundColorNone(3, 2, False)
*Nate Hunter
Message 14 of 16 (76 Views)

Re: Excel to AutoCAD Table

03-07-2006 12:09 PM in reply to: *Nate Hunter
Alright you got me on the right track. Thank you very much. I have one
last question for you. I am trying to fill every other line in my table.
How can I go through every other line and set a background fill to it. Here
is my code:

y = my row & x = my column

Set NewColor = New AcadAcCmColor
NewColor.SetRGB 173, 173, 173
myTable.SetCellBackgroundColor y - 1, x - 1, NewColor
If strOddEvenTable = "Even" Or strOddEvenTable = "" Then
myTable.SetBackgroundColorNone y - 1, True
strOddEvenTable = "Odd"
Else
strOddEvenTable = "Even"
myTable.SetBackgroundColorNone y - 1, False
End If




wrote in message news:5104040@discussion.autodesk.com...
Dim acadMoS As IAcadModelSpace2 = acadDoc.ModelSpace
Dim pt(2) As Double
pt(0) = 5.0
pt(1) = 5.0
pt(2) = 0.0
Dim MyTable As AcadTable
MyTable = acadMoS.AddTable(pt, 5, 5, 1, 2)
Dim cr As AcadAcCmColor
cr = AcadApp.GetInterfaceObject("AutoCad.AcCmColor.16")
cr.SetRGB(255, 255, 0)
MyTable.SetCellBackgroundColor(3, 2, cr)
MyTable.SetCellBackgroundColorNone(3, 2, False)
*Nate Hunter
Message 15 of 16 (76 Views)

Re: Excel to AutoCAD Table

03-07-2006 12:23 PM in reply to: *Nate Hunter
I am sorry I meant to say every other row. I am trying to fill the cell
background for every other row.

Any Ideas??

Thanks again for your help. Below is my code:

"Nate Hunter" wrote in message
news:5104104@discussion.autodesk.com...
Alright you got me on the right track. Thank you very much. I have one
last question for you. I am trying to fill every other line in my table.
How can I go through every other line and set a background fill to it. Here
is my code:

y = my row & x = my column

Set NewColor = New AcadAcCmColor
NewColor.SetRGB 173, 173, 173
myTable.SetCellBackgroundColor y - 1, x - 1, NewColor
If strOddEvenTable = "Even" Or strOddEvenTable = "" Then
myTable.SetBackgroundColorNone y - 1, True
strOddEvenTable = "Odd"
Else
strOddEvenTable = "Even"
myTable.SetBackgroundColorNone y - 1, False
End If




wrote in message news:5104040@discussion.autodesk.com...
Dim acadMoS As IAcadModelSpace2 = acadDoc.ModelSpace
Dim pt(2) As Double
pt(0) = 5.0
pt(1) = 5.0
pt(2) = 0.0
Dim MyTable As AcadTable
MyTable = acadMoS.AddTable(pt, 5, 5, 1, 2)
Dim cr As AcadAcCmColor
cr = AcadApp.GetInterfaceObject("AutoCad.AcCmColor.16")
cr.SetRGB(255, 255, 0)
MyTable.SetCellBackgroundColor(3, 2, cr)
MyTable.SetCellBackgroundColorNone(3, 2, False)
Contributor
Kamala
Posts: 18
Registered: ‎03-01-2006
Message 16 of 16 (76 Views)

Re: Excel to AutoCAD Table

04-04-2006 10:35 PM in reply to: *Nate Hunter
Can i knowhow to work out with this in .Net i think there is a lot of change can anyone help with me the basics how to draw a table so that i can try to make up for the other half..
Thanks in advance
Kamala

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community