See the top rated post in this thread. Click here

Page 1 of 3 123 LastLast
Results 1 to 10 of 40

Thread: excel data to draw line in autocad.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    2010-07
    Posts
    3
    Login to Give a bone
    0

    Default excel data to draw line in autocad.

    Dear all,

    This is my first post on this forum.
    I been using AutoCAD for two yrs and recently was trying to incorporate my calculation with excel to autocad.

    my question here is,
    I have a set of data in excel consists of two column, x column and y column,
    how am i going to do in order my autocad will automatic plot a graph with the x and y value of my excel data sheet.
    my idea was to create a button on my excel spreadsheet, when ever i change my parameter that affect my x and y column value, and press the button, it will link to my autocad and a graph will be plotted there.
    is this sound possible?

    I believe by using autolisp will be much more easier as it will perform the calculation and plotting of graph in autocad itself only, but the reason I create my calculation in an excel spreadsheet is because, some of the autocad users in my company are using autocad LT which not able to perform autolisp program. Therefore, I think to let them have an excel calculation for thier own parameter key in, and pass to some other colleugues who owns autocad which able to run lisp program and generate the graph for them.

    I am new to excel marco and also autolisp language, please suggest me if u have any better idea.
    Appreciate very much in advance for ur reply.

  2. #2
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    Quote Originally Posted by yonlih View Post
    Dear all,

    This is my first post on this forum.
    I been using AutoCAD for two yrs and recently was trying to incorporate my calculation with excel to autocad.

    my question here is,
    I have a set of data in excel consists of two column, x column and y column,
    how am i going to do in order my autocad will automatic plot a graph with the x and y value of my excel data sheet.
    my idea was to create a button on my excel spreadsheet, when ever i change my parameter that affect my x and y column value, and press the button, it will link to my autocad and a graph will be plotted there.
    is this sound possible?

    I believe by using autolisp will be much more easier as it will perform the calculation and plotting of graph in autocad itself only, but the reason I create my calculation in an excel spreadsheet is because, some of the autocad users in my company are using autocad LT which not able to perform autolisp program. Therefore, I think to let them have an excel calculation for thier own parameter key in, and pass to some other colleugues who owns autocad which able to run lisp program and generate the graph for them.

    I am new to excel marco and also autolisp language, please suggest me if u have any better idea.
    Appreciate very much in advance for ur reply.
    Try attached file
    Open Autocad drawing
    Open Excel file (AutoCAD must be opened)
    Select four columns
    Press button

    ~'J'~
    Attached Files Attached Files

  3. #3
    Member
    Join Date
    2010-07
    Posts
    3
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    dear fixo,

    thank you so much for your file.
    I have just tried, but it return me with this error msg box when i press the button,
    please see the attached jpeg.
    i still figure it out why, not sure if it because of the autocad version.
    I'm using the autocad mechanical 2010.
    but some of my colleague are using autocad mechanical 2008 and some are LT.
    but i think LT version are not able to do the line plot. correct me if i am wrong.
    hopefully you can help to solve this. or giving some guildlines.
    Many thanks.
    Attached Images Attached Images

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    Quote Originally Posted by yonlih View Post
    dear fixo,

    thank you so much for your file.
    I have just tried, but it return me with this error msg box when i press the button,
    please see the attached jpeg.
    i still figure it out why, not sure if it because of the autocad version.
    I'm using the autocad mechanical 2010.
    but some of my colleague are using autocad mechanical 2008 and some are LT.
    but i think LT version are not able to do the line plot. correct me if i am wrong.
    hopefully you can help to solve this. or giving some guildlines.
    Many thanks.
    I'm working on A2009 only
    You can try open VBA editor (Alt+F11 in Excel)
    then go to Tools->References and change AutoCAD XXXX Object Library
    on your current version - it would be marked as *MISSING* in there
    Unfortunatelly I know nothing about VBA and LT release, sorry

    ~'J'~

  5. #5
    Member
    Join Date
    2011-10
    Posts
    40
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    This is what i am looking for. i picked all references related AutoCAD. i am using AUtoCAD map 2004. i faced this Error Kindly Check it. give me solution friends. Please !

    Code:
    For i = 1 To UBound(lineData, 1) ;gor Error here as "Run time Error 33, type Mismatch
    
    Dim startPt(0 To 2) As Double
    Dim endPt(0 To 2) As Double
    startPt(0) = CDbl(lineData(i, 1)): startPt(1) = CDbl(lineData(i, 2)): startPt(2) = 0#
    endPt(0) = CDbl(lineData(i, 3)): endPt(1) = CDbl(lineData(i, 4)): endPt(2) = 0#
    Set oLine = aspace.AddLine(startPt, endPt)
    Next i


    Quote Originally Posted by fixo View Post
    I'm working on A2009 only
    You can try open VBA editor (Alt+F11 in Excel)
    then go to Tools->References and change AutoCAD XXXX Object Library
    on your current version - it would be marked as *MISSING* in there
    Unfortunatelly I know nothing about VBA and LT release, sorry

    ~'J'~

  6. #6
    Member
    Join Date
    2012-10
    Posts
    4
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    It works, it's amazing. How do You know this all Fixo? Where can I find some tips how to create such a connection between ACAD and Excel? I have much more questions but I don't want to bother you.

  7. #7
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    Glad if this working for you,
    To be honestly I'm just an old homesitter and
    do nothing but make the programs, piece by piece,
    day by day, on many languages, its all my life...
    Search this forum: Interaction between AutoCAD and Excel,
    all 6 parts
    Cheers

  8. #8
    I could stop if I wanted to
    Join Date
    2006-03
    Location
    San Cristobal, Guatemal
    Posts
    439
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    Quote Originally Posted by fixo View Post
    Try attached file
    Open Autocad drawing
    Open Excel file (AutoCAD must be opened)
    Select four columns
    Press button

    ~'J'~
    I am attempting the same thing. I have selected to four columns and pressed the button, Received "Compile Error: Cannot find project or library." Excel 2007 with ACADm 2012. Please advise, Thank you!

  9. #9
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    Quote Originally Posted by Darren Allen View Post
    I am attempting the same thing. I have selected to four columns and pressed the button, Received "Compile Error: Cannot find project or library." Excel 2007 with ACADm 2012. Please advise, Thank you!
    Hi Darren, I just tested this one on my AutoCAD 2010,
    try to change references on your A2012 Relesase,
    then let me know about

  10. #10
    I could stop if I wanted to
    Join Date
    2006-03
    Location
    San Cristobal, Guatemal
    Posts
    439
    Login to Give a bone
    0

    Default Re: excel data to draw line in autocad.

    Quote Originally Posted by fixo View Post
    Hi Darren, I just tested this one on my AutoCAD 2010,
    try to change references on your A2012 Relesase,
    then let me know about
    Sorry, it took so long to reply. How do I change the references?

Page 1 of 3 123 LastLast

Similar Threads

  1. use excel data to draw
    By santhoshi.civil114776650 in forum AutoCAD General
    Replies: 13
    Last Post: 2017-05-15, 02:36 AM
  2. Replies: 13
    Last Post: 2014-07-01, 02:23 PM
  3. Bring data to Excel from AutoCAD
    By cparvez in forum Dot Net API
    Replies: 1
    Last Post: 2014-05-27, 08:46 PM
  4. Replies: 4
    Last Post: 2014-01-01, 07:58 PM
  5. import text and data from excel into autocad
    By elipman in forum AutoCAD General
    Replies: 4
    Last Post: 2008-12-22, 08:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •