jjatho Posted October 12, 2012 Share Posted October 12, 2012 I'm brand new to AutoLISP, but I do have programming experience so I've been able to sort out a few things. I'm having problems with the following though. I prompt the user for some input to store in variables, which seems to work fine, but I'm not sure how to use those variables later in the Command function. (setq eyeLength(getreal "\n Eye Length (in): ")) (command "CIRCLE" "0,0" ""eyeWidth"") I'd like the value for eyeWidth to be used as the radius, but I can't seem to get the right syntax for it to work. None of the examples I've found online actually use variables in commands, so I'm a bit stuck. The second question is a bit more advanced. Once I draw all the lines, arcs, and circles I need, I have to sweep the circles across the arcs and lines. I'm not really sure where to begin. How does one even go about selecting an object with AutoLISP? I need to figure this out so I can SWEEP and EXTRUDE a few things. Thanks! Quote Link to comment Share on other sites More sharing options...
ketxu Posted October 12, 2012 Share Posted October 12, 2012 1. (command "CIRCLE" "0,0" eyeLength) 2.Some of funtion will helpful : - entsel: prompt user for piking an object ( nentsel, nentselp is sth #) - ssget : prompt user for selecting objects - entlast : select object (ename) created last And sth more You should go to help develop Quote Link to comment Share on other sites More sharing options...
jjatho Posted October 12, 2012 Author Share Posted October 12, 2012 (edited) Thanks. That worked for the first question. I guess a follow up would be, can I select objects with their entity name? I figure I can just check the entity name with entlast and entget every time I create an object and then just assign that to a variable and use it to select them later on. EDIT: Ok I've figured it out, apparently I can just use the variable with the entity name directly in commands. This is going to save me immense amounts of time. Edited October 12, 2012 by jjatho 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.