I am very knowledgable in AutoCAD. In my opinion is the best drafting software out there, but I just recently entered the world of coding, kind of jumping around between languages, giving them a shot. I have done this and know i have a very moderate knowledge of how programming works.. there is always something similiar doesn't matter how different the languages can be. Then i went back to my AutoCAD and starting learning about AutoLISP. WHich from the little education i have on it, i can already see all the fantastic things I can do with it to help me with my job. I was wondering if the community can help me here.
Pretty much I want a user to input a number and if its a choice of three, then have that number be assigned to a variable.. Here is the code i have so far, its very basic.. so hopefully it won't be too hard to answer. This wont' compile.. or i guess in this language, it won't run correctly. can anyone please help me out here? Any input would greatly be appreciated!
- Code: Select all
(setq choice (getdist "\nCreate: Oil(1) , Gas(2), or Water(3)"))
(if (= choice 1))
(alert "You chose Oil")