Jump to content

Creation Of Single Line Drawing From Excel Data


smitaranjan

Recommended Posts

image.thumb.png.cf05f2c8ed1f5c88634dabac2c6c1595.png

to image.thumb.png.72f6d8c669693cf9a052e1a626ba154c.pngthis...I have so many data and need to make this type of drawing can anyone suggest lisp or script to make the drawing possible easily...POP to POP will get connected by different GP. 

 

Thanks in advance

Link to comment
Share on other sites

I think you'll need more data in your spreadsheet, for example if the structure is connected to a T, or a straight connection

  • Like 1
Link to comment
Share on other sites

Like Steven P says, your (spreadsheet?) probably needs more fields , for example I assume distances (...km) are probably different for each situation? Further more , each 'typical' (POP, GP) may need its own little symbol if each row can have a different setup. Can there be more than one row on each drawing? If so , create a little block called gridpoint or something on a non plotable layer so in your spreadsheet you can reference what row the symbols are coming.

If all drawings are exactly the same as in your example , then its just one symbol with a couple of attributes and fill those with your data from your spreadsheet. Easiest way in my humble experience is to save your spreadsheet to a csv file , make sure first column is your point of reference (like drawing name or tag number whatever), read the complete list in one go into a lisp list and convert it to a assoc list like '((tag1 . (data...) ... (tagx . (data...)). From there you could do something like : for each row in list , erase everything in drawing & purge (to start with a blank drawing) , insert row-symbol(s) , fill attributes , saveas drawing , next row... etc.

 

Hope I gave you some inspiration assuming your here to learn & try to write your own briliant app ofcource 🤓

 

🐉

  • Like 2
Link to comment
Share on other sites

18 hours ago, rlx said:

Like Steven P says, your (spreadsheet?) probably needs more fields , for example I assume distances (...km) are probably different for each situation? Further more , each 'typical' (POP, GP) may need its own little symbol if each row can have a different setup. Can there be more than one row on each drawing? If so , create a little block called gridpoint or something on a non plotable layer so in your spreadsheet you can reference what row the symbols are coming.

If all drawings are exactly the same as in your example , then its just one symbol with a couple of attributes and fill those with your data from your spreadsheet. Easiest way in my humble experience is to save your spreadsheet to a csv file , make sure first column is your point of reference (like drawing name or tag number whatever), read the complete list in one go into a lisp list and convert it to a assoc list like '((tag1 . (data...) ... (tagx . (data...)). From there you could do something like : for each row in list , erase everything in drawing & purge (to start with a blank drawing) , insert row-symbol(s) , fill attributes , saveas drawing , next row... etc.

 

Hope I gave you some inspiration assuming your here to learn & try to write your own briliant app ofcource 🤓

 

🐉

Hi Rlx, Thanx for the advice. As a neophyte in lisp couldn't do the job...can you please make a lisp to do that SLD? please find attachment, I need to make like this. It will be a great help.

Blocks.dwg4.thumb.png.9310ae507cf1ef01cdf9bdb6e1e132b7.png 3.thumb.png.10b12a5160301a12b2f6fddf025e7c8b.png2.thumb.png.e82b61be58ab437e4ef388f65c77ab45.png1.thumb.png.bec2cba48f38231997da54d95192c317.pngAPSFL.csv

Link to comment
Share on other sites

23 hours ago, Steven P said:

I think you'll need more data in your spreadsheet, for example if the structure is connected to a T, or a straight connection

Each SLD will be done between 2 POP. POP-POP. and it will be bent if BJC is placed their and then it will  change its direction and will go straight. Its act like a splice point. I have done SVC...In which sequence is placed. if after its going to straight then Only GP will be their. You can refer image attached which are the result I want and SVC file.  Thank you

Link to comment
Share on other sites

2 hours ago, BIGAL said:

Maybe look at VISIO its more a project based flow modelling tool.

can't it be done with AutoLisp or script in AutoCAD? I need to Automate all these tasks...that's why need help

Link to comment
Share on other sites

I think that a pure automated diagram creator using excel data in this instance is gong to be more complex than you think using the data you have.

 

For example to make a 'T' you have 3 lines in excel, to go straight you have 1 line in excel, the LISP needs to be able to work through all the lines and work out what is happening where.

 

How fixed is your spreadsheet format? Can that be amended so that each line is a type something like this:

 

image.thumb.png.bc9119909eb9273ae67a7c4fdf445a5f.png

 

 

Final thought, the line diagram LISP I use just makes up the basic shape, I have to fill in the details, a simpler LISP for you might be to create the blocks and then insert then am the right spacing according to say, text entry in the command line or a pop up box

 

Link to comment
Share on other sites

Like Steven P your excel has to explain what is next so when you have a 'T" for say GP-1 the information starts at column "E" then the lisp would detect that a "T" is required you need to think more about how would you detect what is next step. May need even more indentation inside the excel

image.thumb.png.79829fc6f69fab81e0e50a9d71b8bf9f.png

Link to comment
Share on other sites

I think its doable, have done some preperation but not sure if and when I can show something. Data is difficult to handle but hey, I'm a dragon, difficult is my middle name.

  • Like 2
Link to comment
Share on other sites

This is the first 'proof of concept' version. Its not yet complete , still have to add routine to add lines between symbols , line connecting rows and auto-sum distances for clamps , but have been at this from last thursday evening until now (sunday evening) so this has cost me a lot of time so far and also have to deal with big work related challenges this week (just so you know 😓)

 

🐉

Analysis.jpeg

RlxSnake_Dialog.png

RlxSnake.lsp A3.dwg BJC.dwg Clamp.dwg GP.dwg GP-Clamp.dwg POP.dwg

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, rlx said:

This is the first 'proof of concept' version. Its not yet complete , still have to add routine to add lines between symbols , line connecting rows and auto-sum distances for clamps , but have been at this from last thursday evening until now (sunday evening) so this has cost me a lot of time so far and also have to deal with big work related challenges this week (just so you know 😓)

 

🐉

Analysis.jpeg

RlxSnake_Dialog.png

RlxSnake.lsp 29.79 kB · 3 downloads A3.dwg 64.35 kB · 2 downloads BJC.dwg 28.81 kB · 2 downloads Clamp.dwg 65.14 kB · 2 downloads GP.dwg 69.41 kB · 1 download GP-Clamp.dwg 64.85 kB · 2 downloads POP.dwg 64.82 kB · 2 downloads

Thanx a lot for doing🙏The Grand Master 👏

Link to comment
Share on other sites

Thanx for the recommendation Bigal but I'm not in it for the money. When 'they' pay they'll own (or think they do) a piece of your soul but I'm a 'dragon' so I'm never gonna be anyone's ... well it starts with a b and it gives me an itch haha

  • Thanks 1
Link to comment
Share on other sites

I do stuff for beer money at times and like you they usually get way more than what they asked for with extra programs etc and have a direct line to ask other questions. 

  • Like 1
Link to comment
Share on other sites

I do these things because I like to do them for fun (and sometimes a bucket of sweat) (and swears) but generaly speaking , as a hobby it's fun , but as soon as money gets involved , it kinda takes away the fun and turns it into responsibility you know...

Edited by rlx
  • Like 2
  • Agree 1
Link to comment
Share on other sites

voila (well almost, just see in picture upper right clamp has no summarized value , darn , will kill that bug later)

 

updated : smashed the bug 🐞

 

 

🐉

V1.0.jpeg

Symbols.zip

RlxSnake.lsp

Edited by rlx
snake updated , bug smashed
  • Thanks 1
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...