Jump to content

Need Help with Text increment lisps


rwsice9

Recommended Posts

Hello everyone. I'm hoping one of you LISP geniuses can help me out. I dont know a whole lot about Lisp, but I think my question would be pretty simple for someone with a good LISP knowledge to figure out quite fast.

 

I have attached a LISP and a DCL. Everything is working properly on it except for one thing. There are two checkboxes on the right of the dialogue box, one says EOL, and the other says Amber CKT. What I would like the lisp to do is, when one of the check boxes is checked, to add a fixed suffix onto the text string that the program is already building. They need to add these suffixes:

 

EOL - "(EOL)"

Amber - "A"

 

Like I said, I think this would be pretty easy for somone who has experience writing LISP. If anyone can help me out I would greatly appreciate it!

map.zip

Link to comment
Share on other sites

Yeah, I actually did download your program the other day, and I do like it.. However, the problem for me is, the files that I have uploaded have been in use around my company for a while, and people are used to it.. and we all know how "fun" it is to try to teach people something new.. haha..

 

I was secretly hoping that you would be the one to reply to my post when I posted because of how good your program works!

 

If you look at my upload, you'll see the "custom suffix" text box, which I do have working.. But, I want to make this as simple as possible for my other users, and not have them have to actually go in and type the suffix in manually (much easier if they can just click a button). So.. mostly what I am looking for is the method to use to get the lisp to add the predefined suffixes if the user checks the checkbox. For instance.. the EOL check box would be used very seldom (only on the last device on a circuit), so Id like the user to be able to put in all the numbers, then switch back to the dialogue real fast, check the box, then finish the circuit.

Link to comment
Share on other sites

If its easy...*sigh* never mind.

 

Like I said.. I came here and made the post because I need help, because I dont have much knowledge of LISP.. so no, for me it is NOT easy. If it was easy for me, I would not need to ask for help. I may be new to the forum, but I think a comment like that should be something that one might think to themselves, and not actually post on a public forum and insult the originator of the post. So, I apologize if I have wasted your time by asking for help with something, but please also keep in mind that you didn't HAVE to reply..

 

Please, anyone else, if you can help me out, please do, but if all you have to say is something negative... move along.. theres nothing to see here.

Thanks

Link to comment
Share on other sites

Sorry, i apologize. You are right. Ive been used and abused today (I'm a puddle) and i shouldnt have taken in out on you. I have a ton of other things to get done 3 days ago by 5 minutes ago but if i get time i will download your stuff and fix what i can.

 

Do you know where about the changes need to be made are (have you looked in the files or anything)?

Link to comment
Share on other sites

If its easy...*sigh* never mind.

 

 

This has to be the funniest post I've read all day!

 

I genuinely laughed my @$$ off... no joke, there it is, plopped on the floor, acting like it's got nothing to do...

Link to comment
Share on other sites

Re-reading your question (and real quickly, here are my questions for you before i download your files):

 

What do those check boxes currently do?

Can you give me an example string (prefix, suffix, etc. included)?

Link to comment
Share on other sites

Do you know where about the changes need to be made are (have you looked in the files or anything)?

 

 

I took a peek, as I have no experience with DCL (but am interested), and *I could be wrong*, but it appears that there is no set_tile, or action_tile calls (in the LSP) for the "Circuit Suffix" boxed column (in the DCL), (i.e., the "EOL", and "Amber Srobe CKT" toggles).

 

... I'm not sure what to do with that, but it jumped out to me. *Hopefully* that wasn't completely off-base.

 

[edit]

If this is the DCL "key", then a line of code is missing (in the LSP) for the each of the toggles mentioned, like so:

 

(action_tile "[color=red]prefix[/color]" "(set_tile \"prefix\" (strcase $VALUE))")

[/edit]

Link to comment
Share on other sites

Yeah it appears you are right; there isnt any code for these check boxes yet (and they look like they were not added by the orig author) and im a bit confused as to how this whole progy is supposed to work because there is already a SUFFIX edit box. Are these check boxes supposed to add to what is at the end of what is typed in the suffix edit box or visa versa? ...I think I want to go back to my *sigh*.

Link to comment
Share on other sites

Se7en..

I do completely understand where youre coming from with the having a whole bunch of stuff to get done 3 days ago! Sounds like my job..haha.. Anyways, reading your replies, Ill see if i can answer your questions and make sense..

 

Have I looked in the files? Yes i have, but with my limited (still trying to learn) knowledge of lisp, I can pretty much read the code and figure out what it does, but I dont know what to add to it to get it to do what i want.

 

What do the check boxes currently do? Nothing at all.. This was a DCL and a LISP written by someone else that I am trying to modify and add functionality to.

 

Example string: Basically.. the prefix is the circuit number.. i.e "V1-", and the part that gets incremented is the number after the dash, which creates text like; V1-1, V1-2, etc. What I want the check boxes to do is, when the user reaches the last device on the circuit, I want to be able to return to the dialogue box, click the EOL check box, and have the resulting string say V1-8(EOL). In the case of the Amber Strobe Circuit checkbox, it would be a toggle that would be left on during the entire circuiting process.. V2-1A, V2-2A, etc, and still have the option to return to the dialogue and check the EOL box and get the last number to read V2-8A(EOL).

 

I did add the Custom Suffix text box, and got that to work myself (I cheated and copied all the code that was associated with the prefix box), but I want to have the two check boxes create the predefined suffixes without the user having to type anything into the Custom Suffix box. (Trying to keep CAD standards in mind while doing this too, of course).

 

Hope that points you in the right direction.. I really do appreciate the help!

Link to comment
Share on other sites

Sounds like a lot of work for very little gain if I'm honest - can't the users just edit the last circuit number when they reach the last device? After all, you already have two programs that can number the circuits for you.

Link to comment
Share on other sites

ok i know nothing about circuiting you need to speak to me like i am from Mississippi...*ARGH* nope. count me out. Nothing personal or offence intended but this is too much work for me to take on for you; I have far too many things on my plate and not to mention, you didnt say any of this in your orig post (I think you just changed the scope of the project on me).

 

 

This is where the "no offence" comes in to play (I am going to be upfront and honest with you, take it as advice and not me picking on you):

You needed to say this kind of stuff in your first post. Yes the project may seem big when you do that but people are willing to help even if the project is big.

 

You also need to provide as much info as you possibly can without overloading us with info (make every word count in your post; dont waste words on things like "lisp experts" or "it should be easy"...people like me are turned off by that).

 

Again, no offence. And dont get discouraged; if you have to tackle this one step at a time and ask questions at every step there isnt any problem with that (we've all been there). And just so you know, i sounds like you have a pretty big little program there.

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...