Results 1 to 5 of 5

Thread: How to create routine for drawing lines and entering values in text objects based on excel type values?

  1. #1
    100 Club
    Join Date
    2006-12
    Posts
    145
    Login to Give a bone
    0

    Default How to create routine for drawing lines and entering values in text objects based on excel type values?

    Hi folks!

    I'm not sure if this is the right place for this, but somewhere I have to start

    The task is to draw geologic drill hole table.
    There is a bunch of source data that could be entered in excel: Date, Drill hole #, Total height, Geologic index, Layer (ground layer) number, Layer base height (or depth), Description of layer, 2 values of water level.
    Afterwards certain algorithm is applied to create needed table (looks like table, but actually is a drawing). Currently some values are entered in predefined places as text objects, some values are calculated relatively to other values. The Total height is 30.6m, upper ground layer is 1.2 m, so there is horizontal line 1.2 units down from bottom part of head of this table. Once there is horizontal line, there are placed text objects at specified for each entity X value and Y value is line's Y+0.05 units: some of given data as is, some values are calculated (Total height of current layers base and current layers thickness). There are drown also vertical lines which have certain X values, but Y value is Total height minus lowest levels base height.
    These horizontal and vertical lines form squares. Some of these squares are hatched with pick point method. The hatch pattern depends on value of Layer (ground layer) number.
    At some point folks here used AutoCAD table object to do this (setting cell height according layers depth does the trick!) but AutoCAD table object isn't hatchable and they have to expolode it....

    I hope I made myself clear enough.

    This task feels very much like following one predefined algorithm and doing things manually where it actually is more like parametric, and there should be tools available for doing this much more automatically.

    Is this kind of staff doable with LISP? Is LISP the right direction? May be VBA?
    Or may be such feature is already included in Civil 3D (which is installed on machines, but used only as AutoCAD), but people here just aren't aware of it?

    Thanks in advance!

  2. #2
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: How to create routine for drawing lines and entering values in text objects based on excel type values?

    Not sure if C3D has what you need, but it is probably doable in LISP, VBA, or any other. VBA might be easier to get the values directly from Excel (although there are ways from Lisp as well).

    If you can send a sample DWG Result & the original XLS data, some of us might be able to work something out.

  3. #3
    100 Club
    Join Date
    2006-12
    Posts
    145
    Login to Give a bone
    0

    Default Re: How to create routine for drawing lines and entering values in text objects based on excel type values?

    Quote Originally Posted by irneb View Post
    Not sure if C3D has what you need, but it is probably doable in LISP, VBA, or any other. VBA might be easier to get the values directly from Excel (although there are ways from Lisp as well).

    If you can send a sample DWG Result & the original XLS data, some of us might be able to work something out.
    Thanks for your input, irneb! Opinion that "it is probably doable in LISP, VBA, or any other" is a teaser!
    And - here you go with file examples!
    XLS might be different if needed and the outcome also might be slightly different (frame around not necessary).
    The hatch pattern should be set by Layer code value.

    The goal is to take XLS, run a routine and get DWG similar to attached one.
    Any hint that helps to move closer will be greatly appreciated
    Attached Files Attached Files

  4. #4
    Active Member
    Join Date
    2007-04
    Posts
    50
    Login to Give a bone
    0

    Default Re: How to create routine for drawing lines and entering values in text objects based on excel type values?

    I think if u use ACAD_TABLE in AutoCAD and then change the table format of Excel the same way, then u can diretly link the data from ACAD_TABLE with Excel. no program is needed.
    As for the section hatches, I suggess u use blocks (different hatch pattern with differnt block name) inserted in ACAD_TABLE cells.

  5. #5
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: How to create routine for drawing lines and entering values in text objects based on excel type values?

    Quote Originally Posted by Yancka View Post
    Opinion that "it is probably doable in LISP, VBA, or any other" is a teaser!
    Yes, it is. It's just that what you want is not exactly trivial. Drawing a table structure with its lines at specific distances by loading the values from a XLS file is not exactly the most simple piece of code. I can however see that it's quite possible, given someone has a day or two to spend on making this for you.

Similar Threads

  1. 2014: Presetting default drawing command based values
    By cadman_99 in forum AutoCAD General
    Replies: 4
    Last Post: 2013-12-31, 02:03 PM
  2. Updatable Text Based on Dimension Values
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2009-08-28, 01:49 AM
  3. Replies: 6
    Last Post: 2009-08-20, 03:16 PM
  4. Parameter Values Based on Nested Family Type
    By sven.129574 in forum Revit Architecture - Families
    Replies: 3
    Last Post: 2009-07-15, 07:46 PM
  5. Replies: 2
    Last Post: 2008-05-09, 03:27 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
  •