Colsen87 Posted October 28, 2014 Share Posted October 28, 2014 I need to find an advanced user to help troubleshoot an AutoLISP program that is in four parts. The program is proprietary and pretty extensive so I don't know that posting it directly to this forum is an option. I am having a specific issue where a calculation is calling information from a list. I do not understand where this list is created within the code that I have and what information that it is pulling. I know what information I need it to pull and luckily the information that I need is already programmed into another calculation I am just unsure how to get the information I want into the correct list for use. If you think you can be of assistance let me know and we can discuss how to get the code to you. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
pBe Posted October 29, 2014 Share Posted October 29, 2014 Lay it on me dude I'm your huckleberry. Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 (edited) Thank you for the quick response, I have attached the program for your review. Let me give you a little breakdown of how it works and then I will explain the issue that I am having. How it Works: The first file that is called when the program is run is the G.LSP. This file gets the required user input to perform the required calculations for three types of drawings, the girder calculation drawing/camber diagram, the blocking diagram, and web cutting drawing. It sets up the calculations and then stores the required information in a set of lists. It then sets up and draws the girder calculation sheet and calls the other lsp files. The BD.LSP file takes the input from the G.LSP file and creates the blocking diagram. I don't have any issues with this I just included it so that nothing was missing. The third and fourth lsp files work togther. wc.lsp takes the input needed from the G.lsp file and runs the calculations needed to figure out the end cuts. The wcd.lsp then creates the web cutting drawing based on the input; The Problem: The girder calculation and blocking diagram works exactly how it needs to. Where I am having an issue is with the calculations for the web cutting, specifically these lines of code: ; Calculates vertical, hypotenus and angle for each section and adds to list (mapcar '(lambda (x) ; Calculate vertical, hypotenus and angle (degrees) (setq vert (* (- last_cadr (cadr x)) -1.0) hyp (expt (+ (expt vert 2.0) (expt (car x) 2.0)) 0.5) ang (rtd (atan vert (car x))) vha_list (cons (list vert hyp ang) vha_list) last_cadr (cadr x) ) ) wc_list ) I cannot figure out where last_cadr, cadr x, and car x come from. I know what the syntax car and cadr mean in relation to lists but I cannot pinpoint where list x that is being used is defined. The calculations run and come out close, but they are not exact. This is because they are using the wrong piece of information from the girder calculations output. There are two numbers that are calculated that are usually very close and it is using one and not the other. If I can nail down specifically where the information is coming from I can tell it to use the other number from the output. I think the information above comes from the g.lsp file but I am not sure. The code below is where I was thinking it came from: ; Web cutting calc (setq wc_list (cons (list fs_l fs_hl_gl) wc_list) ) If you aren't completely confused at this point and can help that would be greatly appreciated. Edited October 29, 2014 by SLW210 Code Tags Quote Link to comment Share on other sites More sharing options...
Dadgad Posted October 29, 2014 Share Posted October 29, 2014 Welcome to CADTutor! Having stated that the program is proprietary, I suggest you delete the attachments, once you have confirmation from pBe that he has gotten them. You can select the EDIT POST option and delete the attachments lest they quickly lose their proprietary status. Quote Link to comment Share on other sites More sharing options...
pBe Posted October 29, 2014 Share Posted October 29, 2014 (edited) You know what Colsen87 , Dadgad made a good point , I was expecting you would send me a PM [Private Message] so go ahead and delete the attachments. I'll have a look see. [wrote you a VISITOR message] Edited October 29, 2014 by pBe Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 Thank you for the heads up. I am still new to the forum and did not realize private messaging was an option. Now to figure it out so that I can send pBe the rest of the info he is requesting. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted October 29, 2014 Share Posted October 29, 2014 Welcome to CADTutor! You will not be able to use Private Messages until you have 10 posts. Also, please read the Code Posting Guidelines and use Code Tags for Code in the future, I fixed your previous post for you. Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 Thank you again for helping out a noob. Now to get my posts # past 10. Looks Like I am going to hit up the introduce yourself thread. Quote Link to comment Share on other sites More sharing options...
eldon Posted October 29, 2014 Share Posted October 29, 2014 I am afraid that posts to the Community part of the forum do not add to the post count. But if you thank me for this information in this thread, your post count will be increased by one. Good luck in your endeavours Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 (edited) pBe since there is some urgency in my trying to get this program figured out, and since I do not have permissions to send private messages yet, I will attache the two files you requested on here. Please let me know when you have them so that I can take them back down. Since everything has been posted in pieces the program should be fairly safe for now. Edited October 30, 2014 by Colsen87 Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 29, 2014 Share Posted October 29, 2014 The way around all this is by posting your email in a form that is not easily recognizable to a bot. Then pBe can touch base with you. Example... x c o l s e n AT a t t DOT n e t Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 Thanks ReMark I may have to give that a try. I need only 4 more posts. Quote Link to comment Share on other sites More sharing options...
eldon Posted October 29, 2014 Share Posted October 29, 2014 Did you see my reply (post # 9). The time of posting was very near your posting, and you may have overlooked it. Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 eldon, I did in fact miss your post. I did read it, however I ran it together and though that it was a response from one of the other members. Thank you for then input by the way! (and after I already took the time to introduce myself lol) Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 (edited) pBe, one other thing that I thought of. You can use the file attached to this link for the input (rather than trying to use input that might not work anyway) to help troubleshoot the program. Edited October 30, 2014 by Colsen87 Quote Link to comment Share on other sites More sharing options...
Colsen87 Posted October 29, 2014 Author Share Posted October 29, 2014 so in other words, open CAM1 (input drawing). Use the Alpha.lsp to call the G.lsp (you may just be able to load the G.lsp by itself if you put all the .lsp files that I sent you into one directory and point to it in the support file search path in AutoCAD. When you run G.lsp it should ask for some additional user input. Since this should be post number 10 I will private message you all of this information all the files and information I have posted so far. 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.