See the top rated post in this thread. Click here

Results 1 to 7 of 7

Thread: AU2006 LISP Table Magic

  1. #1
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,106
    Login to Give a bone
    0

    Default AU2006 LISP Table Magic

    Hey Group,

    I just wanted to mention that I had a good response to my class at AU2006.

    The course title was LISP Table Magic.

    Do you ever want to create tables with LISP? Bill of materials? etc...

    I wrote a series of functions that create and populate tables on the fly.

    If anyone is interested, I can post the code here.

    Peter

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: AU2006 LISP Table Magic

    That would be great, Peter. I'm sure they would be used by many.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,106
    Login to Give a bone
    1

    Default Re: AU2006 LISP Table Magic

    Here is the code.

    Load the LISPTableMagic.lsp first (written for A2k6)
    LISPTableMagicBonus.lsp next (written for A2k7)
    and finally the UpdateTable.lsp

    The handout only covers the first file, the others were bonus files.

    Run the BOMDIalog command line function to sepcify blocks to show in schedule and set pricing.

    Run BillOfMaterials command line function to create a block schedule.

    If you change the number of blocks the updateTable function will update the table.

    Make sure your textsize system variable is not set to zero.


    Peter
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    2013-04
    Posts
    16
    Login to Give a bone
    0

    Default Re: AU2006 LISP Table Magic

    Thanks Peter,

    That is really helpful, I have looked through the updatetable.lsp and this seems to be what I am looking for...
    However I am really after a single action that will update a single cell in a specified table.

    The table styles / names are always going to be named... are there any short snippets of code I could use with this?

    For example:
    (defun update_table (tablename row col content)
    ** update it here**
    )

    (update_table “revisions” “a” 1 “This is the contents”)

  5. #5
    Member
    Join Date
    2012-12
    Posts
    10
    Login to Give a bone
    0

    Default Re: AU2006 LISP Table Magic

    Hello Peter,
    I'd like to ask you for instructions on how to add columns, of specific tags of attributes when they exist in blocks? Is that possible?
    Also I have a question number 2: is there a way to select blocks of which the BOM is made, or it is always all of blocks in the drawing?
    The third question would be: the switch to include/exclude xref and xref's blocks from BOM Table?

    This is a great lisp routine, thank you very much for sharing! It is transparent the way it is written, only that I do not know lisp, I am a simple end user
    Best regards!
    Michal

  6. #6
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,106
    Login to Give a bone
    1

    Default Re: AU2006 LISP Table Magic

    Hi Michal,

    In order to keep the program manageable for presentation at AU I didn't add those features to the program.

    It is possible to do all of that.

    1.) It is not designed to include attribute strings, but it could, but it is not straight forward to do.

    2.) It would require modifying the AU06:CountAllBlocks to not search the whole modelspace but prompt for a partial selection set.

    3.) without creating a switch for xrefs, you could program it to ignore them with a single line of code or so.

    in the AU06:countallblocks subroutine after

    Code:
    (/= (substr strBlockName 1 1) "*")
    add this line

    Code:
    (= (vla-get-isxref objItem) :vlax-false)
    P=
    AutomateCAD

  7. #7
    Member
    Join Date
    2012-12
    Posts
    10
    Login to Give a bone
    0

    Default Re: AU2006 LISP Table Magic

    Dear Peter,
    Thank you for your answer! Please excuse, it took me two years to reply. Kindest regards,

Similar Threads

  1. CP311-3: Visual LISP® Table Magic
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-05-05, 01:35 PM
  2. CP34-3: LISP Table Magic
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-04-17, 04:49 AM
  3. CP42-2: A Visual LISP Wizard's Intro to Reactor Magic
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-04-08, 07:24 PM
  4. CP33-2: A Visual LISP Wizard's Intor to Object Magic
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-04-08, 07:20 PM
  5. CP22-1: A Visual LISP Wizard's Intro to List Magic
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-04-08, 07:12 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
  •