Jump to content

Lisp to draw circles and rectangles from values in a .CSV file


CADINATOR

Recommended Posts

Hi, brand new to this site and my very first thread! I am trying to write a LISP routine and basically have no experience with it except for opening them up and trying to decode it for my self. I am going over lisp basics right now but thought I would through this out there in hopes of learning something from you fine folks.

 

What I need to do is draw a series of circles and rectangles and label them from values in a .CSV file.

 

As I mentioned I am going over the basics and am having trouble keeping my head above water, so be kind please. :)

 

Thanks in advance,

CADINATOR

Link to comment
Share on other sites

A simple alternative if you have CSV stay in excel and just write a defacto script works with LT also, the key is using concatenate(a1,".",b1) = "123,456" just copy the new column straight to the command line.

 

123,456,22 = CIRCLE 123,456 22

123,456,789,910 = Rectang 123,456 789,910

 

Like lee post csv so can show 2 ways to do same thing.

Link to comment
Share on other sites

Sorry for the long response time. I am not sure what you mean about just using an excel sheet. Attached is an example of tools with diameters and some with length and widths. Took me a while to figure out how to post the Excel file. Thanks for your help.

TEST.xlsx

Edited by CADINATOR
Link to comment
Share on other sites

H & G If I used a base of 0,0 all objects would be on 1 point so just put them 50 units apart, if you nominate shaft length it will appear in 3d as well.

 

A little bug 2013 if you set thickness then rectang it has zero thicknes compared to a pline of 4 sides any ideas any one ? Hence use of chprop after using rectang.

Link to comment
Share on other sites

Oh, I see. that makes sense for the spacing. So this would work for what I need it for. I would love to use this if you don't mind. Am I able to say add new tools to this sheet when I have other kits that have tools by dimension? Or would I have to re write the language every time I have a different set of tools? If my list was longer would I be able to expand on it by copying the expressions to different rows keeping in mind adding spacing in column's G & H?

Link to comment
Share on other sites

1 You are welcome to use.

2 make new tools

3 just copy formula

4 it could be smarter and check if circle or sq by cell is blank then use rectang or circle you can do IF's in excel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...