rlx Posted April 2, 2023 Share Posted April 2, 2023 dont have any of the problems you're describing , what autocad version are you using, which printer do you use? maybe it helps to clear output folder first. any error messages in text screen (F2)? Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted April 2, 2023 Author Share Posted April 2, 2023 1 hour ago, rlx said: dont have any of the problems you're describing , what autocad version are you using, which printer do you use? maybe it helps to clear output folder first. any error messages in text screen (F2)? Command: D:\SLD\output\diagram-2.dwg exists and is open for editing in another session or by another user and cannot be replaced.; error: Automation Error. Description was not provided. Autocad 2023, Microsoft print to pdf(A3) Quote Link to comment Share on other sites More sharing options...
rlx Posted April 4, 2023 Share Posted April 4, 2023 Did a few updates by placing some strategic princ functions and some error catching. Replaced most if not all command calls with vla- counterparts so it should be faster and less cluttering on your text screen. Hope this will either work better for you or at least show where it has a bad haircut day on your computer. APSFL Latest 4.csv symbols.zip RlxSnake.lsp Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted April 4, 2023 Author Share Posted April 4, 2023 2 hours ago, rlx said: Did a few updates by placing some strategic princ functions and some error catching. Replaced most if not all command calls with vla- counterparts so it should be faster and less cluttering on your text screen. Hope this will either work better for you or at least show where it has a bad haircut day on your computer. APSFL Latest 4.csv 2.59 kB · 0 downloads symbols.zip 330.28 kB · 0 downloads RlxSnake.lsp 57.44 kB · 0 downloads RlxSnake : Single Line Generator - Last update : 2023 April 4 Command: Command: RLXSNAKE Command: Command: Blocks connected Clamps updated Titleblock updated File saved : D:\TASK RELATED\diagram-1erase Select objects: all 12 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : D:\TASK RELATED\diagram-2; error: Automation Error. Description was not provided. Command: Command: AP APPLOAD RlxSnake (4).lsp successfully loaded. Command: RlxSnake : Single Line Generator - Last update : 2023 April 4 Command: Command: RLXSNAKE Command: Command: Blocks connected Clamps updated Titleblock updated File saved : D:\TASK RELATED\diagram-1; error: Automation Error. Description was not provided. Command: Command: <Snap on> Command: RLXSNAKE Command: Command: Blocks connected Clamps updated Titleblock updated File saved : D:\TASK RELATED\diagram-1erase Select objects: all 12 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : D:\TASK RELATED\diagram-2; error: Automation Error. Description was not provided. I guess it has a bad haircut day on my computer Quote Link to comment Share on other sites More sharing options...
rlx Posted April 4, 2023 Share Posted April 4, 2023 (edited) with me it looks like : RlxSnake : Single Line Generator - Last update : 2023 April 4 Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-1Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. erase Select objects: all 12 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-2Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. erase Select objects: all 26 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-3Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. erase Select objects: all 12 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-4Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. When I look at your output you seem to be running multiple instances simultaneously because of the appload. So remove it from there. And dont let it autostart by placing (c:rlxsnake) at the end of the lisp file (that's only for testing). You should have to load it only once , place in one of your support / lisp folder en then load with (load "RlxSnake") and after loading just type RlxSnake or (c:RlxSnake) to start the program. You can place (load"RlxSnake") in the startup routine in acad.lsp so your snake is always available everytime you open or start a drawing. p.s. maybe more routines are autoloaded? Don't over do this , because its also possible one can effect another and usualy not in a positive way. I prefer load-on-demand. Maybe make a button in your menu / toolbar and add command like : "(if (not (c:RlxSnake))(load"RlxSnake"))(c:RlxSnake)" I do have some routines loaded via acad.lsp but those have proven themselves worthy over the years and I only load the ones I use like ten times a second Edited April 4, 2023 by rlx Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted April 17, 2023 Author Share Posted April 17, 2023 On 4/4/2023 at 3:24 PM, rlx said: with me it looks like : RlxSnake : Single Line Generator - Last update : 2023 April 4 Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-1Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. erase Select objects: all 12 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-2Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. erase Select objects: all 26 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-3Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. erase Select objects: all 12 found Select objects: Command: Command: Blocks connected Clamps updated Titleblock updated File saved : C:\Temp\Lisp\_Cad-Tutor\smitaranjan\RlxSnake\Output\diagram-4Effective plotting area: 371.83 wide by 263.00 high Plotting viewport 2. When I look at your output you seem to be running multiple instances simultaneously because of the appload. So remove it from there. And dont let it autostart by placing (c:rlxsnake) at the end of the lisp file (that's only for testing). You should have to load it only once , place in one of your support / lisp folder en then load with (load "RlxSnake") and after loading just type RlxSnake or (c:RlxSnake) to start the program. You can place (load"RlxSnake") in the startup routine in acad.lsp so your snake is always available everytime you open or start a drawing. p.s. maybe more routines are autoloaded? Don't over do this , because its also possible one can effect another and usualy not in a positive way. I prefer load-on-demand. Maybe make a button in your menu / toolbar and add command like : "(if (not (c:RlxSnake))(load"RlxSnake"))(c:RlxSnake)" I do have some routines loaded via acad.lsp but those have proven themselves worthy over the years and I only load the ones I use like ten times a second HOW can I do this type of case too? See marked part in the drawing? After JBC use how can I connect GP with another GP and then return back to JBC to execute other part? Quote Link to comment Share on other sites More sharing options...
rlx Posted April 17, 2023 Share Posted April 17, 2023 this is more and more looking like my life's work I think this all depends on how the data is presented is your csv list. Normally a clamp is shown as {clamp GP clamp} so it would be possible to change that to [clamp GP GP clamp} to handle your second image. But for your first image... i dunno... you would have to introduce a new type of clamp because when routine reads {clamp} it goes into special mode and keeps on reading until the word clamp appears again and treats it as one unit. So the entire symbol would have to consist of a horizontal clamp plus a vertical clamp with a bottom and a right GP , all in one special symbol. Current routine can't handle snake within a snake. As for the overlapping , I updated attributes to mtext attributes previously but I think it probably needs a space to start a new line. Else you need (as I used before) attribute with type 'fit' and that will work but short names will get stretched out and that also doesn't look pretty. I don't think its realistic that routine will ever be able to handle every situation you throw at it , human intervention will always be needed (if it could handle everything you would be out of a job...) 1 1 Quote Link to comment Share on other sites More sharing options...
Steven P Posted April 17, 2023 Share Posted April 17, 2023 36 minutes ago, rlx said: (if it could handle everything you would be out of a job...) I know my boss is going to ask me tomorrow "So these LISPs, can they do everything?" RLX this is looking very good 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 18, 2023 Share Posted April 18, 2023 Rlx, smitaranjan when looking at problem way back suggested then that the Excel be indented each indent doing something so for a downward link, column A would be blank for each GP-8 & GP-9 2nd image above, then back to column A to continue horizontal. A go right after a down a double indent column A Blank, Colum B blank, 1st image GP-7 could do tree answer but code is becoming more and more complex. I would use a read excel direct I think would be easier than working with a csv. Make a list say up to say column G. Quote Link to comment Share on other sites More sharing options...
rlx Posted April 18, 2023 Share Posted April 18, 2023 Maybe Smitaranjan has no say in the matter on how this data is presented. I dont know how the data for a double clamp looks like because I've only see the pictures , not the csv file. But it could be helpfull for each special to have its own little template like 'clamp2' for clamp with 2 GP's and 'clamp3' for situation as shown in 1st picture so when csv (or xls) is read app knows how to handle this and insert appropriate symbol. This can be very modular and easily expanded. But like I said , this might be a chicken & egg story , it all depends on the data and how it is presented. For me it makes little difference how data is presented because xls can be saved as csv and reading from a text file is less complex than to read from excel. In both cases data has to turned into a format lisp can handle. But that's just my opinion. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 19, 2023 Share Posted April 19, 2023 (edited) rlx we are both on same page with out some form of trigger to say do this how can a flat csv be read to know do option 3 now. Smitaranjan its your turn now. Edited April 19, 2023 by BIGAL Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted April 19, 2023 Author Share Posted April 19, 2023 2 hours ago, BIGAL said: rlx we are both on same page with out some form of trigger to say do this how can a flat csv be read to know do option 3 now. Smitaranjan its your turn now. Csv can be done as per the convenience...I'll prepare soon...May be if I add some column in csv, suggesting upward, downward, left side horizontal, right side horizontal. Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted April 19, 2023 Author Share Posted April 19, 2023 Or any keywords in the name of the description Quote Link to comment Share on other sites More sharing options...
rlx Posted May 7, 2023 Share Posted May 7, 2023 Update 2023-05-07 Didn't do much testing because have a bus to catch... collected all your new born scenario's in attached csv and introduced a few new templates / symbols. Hope it works and project is now finished. RlxSnake.lsp APSFL Latest 4.csv BJC-4WAY.dwg BJC-U.dwg Clamp-2GP.dwg 1 Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted May 10, 2023 Author Share Posted May 10, 2023 On 5/8/2023 at 12:04 AM, rlx said: Update 2023-05-07 Didn't do much testing because have a bus to catch... collected all your new born scenario's in attached csv and introduced a few new templates / symbols. Hope it works and project is now finished. RlxSnake.lsp 75.13 kB · 2 downloads APSFL Latest 4.csv 7.42 kB · 3 downloads BJC-4WAY.dwg 90.73 kB · 2 downloads BJC-U.dwg 87.19 kB · 2 downloads Clamp-2GP.dwg 75.85 kB · 2 downloads Can it go after the POP too...as in this code it's ending when it found the 2nd POP, can it go beyond that and only ends at Blank Row of Csv data? Quote Link to comment Share on other sites More sharing options...
rlx Posted May 10, 2023 Share Posted May 10, 2023 what you use is not really important as long as it is unique and once you choose something stick to it. [pop-begin] [sym-begin] [....] [sym-end] .... [pop-end] [pop-begin] [sym-begin] [...] [sym-end] ... [pop-end] etc you start each diagram with a keyword (POP) and you end it with the same keyword , the same goes for each symbol so if sym's name is 4way-bjc , end it with 4way-bjc , or , as I did last time , if all 4way-bjc's have 5 lines in csv file , I dont use a keyword but count the lines. Separating diagrams by empty line.. fine by me , or instead of POP begin and end each diagram with keyword like 'district-begin' & 'district-end' , whatever you want , fine by me. Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted May 10, 2023 Author Share Posted May 10, 2023 3 hours ago, rlx said: what you use is not really important as long as it is unique and once you choose something stick to it. [pop-begin] [sym-begin] [....] [sym-end] .... [pop-end] [pop-begin] [sym-begin] [...] [sym-end] ... [pop-end] etc you start each diagram with a keyword (POP) and you end it with the same keyword , the same goes for each symbol so if sym's name is 4way-bjc , end it with 4way-bjc , or , as I did last time , if all 4way-bjc's have 5 lines in csv file , I dont use a keyword but count the lines. Separating diagrams by empty line.. fine by me , or instead of POP begin and end each diagram with keyword like 'district-begin' & 'district-end' , whatever you want , fine by me. When I try csv file which are continuing beyond 2nd POP, then it's drawing only till 2nd POP, it's not reading beyond that Quote Link to comment Share on other sites More sharing options...
rlx Posted May 10, 2023 Share Posted May 10, 2023 as soon as I'm back at work later this month I'll have a new look but as I said before , I'm away and without access to AutoCAD so can't really do something about it right now , only have email & internet access on my work laptop I have with me , AutoCAD wont work because of license issue. So be patience grasshopper (From karate kid movie or Kung Fu series?) Quote Link to comment Share on other sites More sharing options...
smitaranjan Posted May 10, 2023 Author Share Posted May 10, 2023 4 minutes ago, rlx said: as soon as I'm back at work later this month I'll have a new look but as I said before , I'm away and without access to AutoCAD so can't really do something about it right now , only have email & internet access on my work laptop I have with me , AutoCAD wont work because of license issue. So be patience grasshopper (From karate kid movie or Kung Fu series?) Yeahcome soon Quote Link to comment Share on other sites More sharing options...
rlx Posted May 11, 2023 Share Posted May 11, 2023 Figure 1 is built with a few of your symbols. I do have a few problems with them. Insertionpoints : They are all over the place (the red one is way down , green one at end of line , the blue one with a gap between it etc). App works with grid (col & row distance in dialog 50mm) and insertion point in center. Attributes (fig 2) : For example 2GPV-Clamp has 2 attributes with same tag (GP) How would app know which one to change if they both have same tag? It would complicate things considerably , not in the last place having to take in account lef-right / up-down. A few symbols if I recall correctly have tag placed at bottom of symbol but symbol is placed on top of line , attribute woud have to be moved. Lisp routine is not designed to work with separate symbols the way you probably want as in the top figure. It works on a grid (row & collumn distance in main dialog , 50mm). It is nearly impossible (for me at least , maybe ChatGPT knows better) to built diagram with both left-right & up-down dynamically. That's why I use one symbol for each branch and all attributes have a unique tag and insertionpoint in the center (shown as red dots in figure 3) what you want is a 'snake within a snake' , dynamically in all directions , and that's not possible with this app in its present form. App would need to be able to read ahead and analyze stuff like AI and that's beyond my capabillaties at this moment. 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.