smitaranjan Posted March 15, 2023 Share Posted March 15, 2023 to this...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 Quote Link to comment Share on other sites More sharing options...
Steven P Posted March 15, 2023 Share Posted March 15, 2023 I think you'll need more data in your spreadsheet, for example if the structure is connected to a T, or a straight connection 1 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 15, 2023 Share Posted March 15, 2023 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 2 Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted March 16, 2023 Author Share Posted March 16, 2023 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.dwg APSFL.csv Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted March 16, 2023 Author Share Posted March 16, 2023 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 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 16, 2023 Share Posted March 16, 2023 If I can find some spare time (time is not my friend) will have a look at this but you're asking a lot bro... 1 Quote Link to comment Share on other sites More sharing options...
devitg Posted March 16, 2023 Share Posted March 16, 2023 @smitaranjan just trying to understand what it is.dwg APSFL-01.csv 1 Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted March 17, 2023 Author Share Posted March 17, 2023 2 hours ago, devitg said: @smitaranjan just trying to understand what it is.dwg 131.37 kB · 1 download APSFL-01.csv 1.84 kB · 1 download Yess...input should be the CSV table and the desired output is Single line Drawing Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 17, 2023 Share Posted March 17, 2023 Maybe look at VISIO its more a project based flow modelling tool. Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted March 17, 2023 Author Share Posted March 17, 2023 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 Quote Link to comment Share on other sites More sharing options...
Steven P Posted March 17, 2023 Share Posted March 17, 2023 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: 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 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 18, 2023 Share Posted March 18, 2023 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 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 18, 2023 Share Posted March 18, 2023 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. 2 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 19, 2023 Share Posted March 19, 2023 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 ) RlxSnake.lsp A3.dwg BJC.dwg Clamp.dwg GP.dwg GP-Clamp.dwg POP.dwg 2 1 Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted March 20, 2023 Author Share Posted March 20, 2023 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 ) 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 doingThe Grand Master Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 20, 2023 Share Posted March 20, 2023 "so this has cost me a lot of time" Maybe donate to rlx for his time. 1 1 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 20, 2023 Share Posted March 20, 2023 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 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 20, 2023 Share Posted March 20, 2023 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. 1 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 20, 2023 Share Posted March 20, 2023 (edited) 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 March 20, 2023 by rlx 2 1 Quote Link to comment Share on other sites More sharing options...
rlx Posted March 20, 2023 Share Posted March 20, 2023 (edited) voila (well almost, just see in picture upper right clamp has no summarized value , darn , will kill that bug later) updated : smashed the bug Symbols.zip RlxSnake.lsp Edited March 20, 2023 by rlx snake updated , bug smashed 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.