alanjt Posted April 21, 2011 Posted April 21, 2011 Alan, my bad... I had setting set wrong in Acad.. should be set to bylayer.... all is ok.thx Steve SSD is cool as posted. Oops, I didn't realize you posted while I was typing and testing. Glad you got it sorted. Quote
sadhu Posted April 21, 2011 Posted April 21, 2011 http://ronleigh.info/autolisp/index.htm This link doesn't work for me. Quote
Organic Posted April 21, 2011 Posted April 21, 2011 As a quick fix, try (setq D2 D). Thanks that worked. How is (setq D2 D) different from (setq D2 (D)) though, or is it not and I was just doing something else wrong before (the script was compiling fine, the width was still incorrect though - I did save and reload the lisp etc)? Quote
Organic Posted April 21, 2011 Posted April 21, 2011 Odd. Too be honest, I haven't looked at this routine since I modified Tim Wilson's original code to work for us. I've only actually used it a handful of times since a week after I wrote it we through Civil 3D training and switched over. I'll look at it when I have a minute and see what the problem is. A lot of old jobs here make use of this as a storm-water linetype also which some design package long ago must have used. Quote
alanjt Posted April 21, 2011 Posted April 21, 2011 This link doesn't work for me. That post is almost two years old, probably means the site doesn't exist anymore. Thanks that worked. How is (setq D2 D) different from (setq D2 (D)) though, or is it not and I was just doing something else wrong before (the script was compiling fine, the width was still incorrect though - I did save and reload the lisp etc)? (setq D2 D) is setting the variable D2 as whatever variable D is. (setq D2 (D)) is trying to set the variable D2 as an evaluation of the function D (since it's not a function and only a variable, it fails). Quote
alanjt Posted April 21, 2011 Posted April 21, 2011 A lot of old jobs here make use of this as a storm-water linetype also which some design package long ago must have used. Yeah, I suppose I've used it a few times when doing stuff that just didn't require needing to fuss with a pipe network. It's very useful for those without C3D or something like it. Quote
Organic Posted April 21, 2011 Posted April 21, 2011 (setq D2 D) is setting the variable D2 as whatever variable D is.(setq D2 (D)) is trying to set the variable D2 as an evaluation of the function D (since it's not a function and only a variable, it fails). Ah, that makes sense thanks. I didn't realize you couldn't have extra sets of balanced brackets in there like that like you can in most other programming languages. Quote
alanjt Posted April 21, 2011 Posted April 21, 2011 Ah, that makes sense thanks. I didn't realize you couldn't have extra sets of balanced brackets in there like that like you can in most other programming languages. It's just that it thinks you are trying to evaluate the expression of what's within the parens. eg. (defun _like (/) (if (eq (getvar 'CLAYER) "0") "PIZZA" "BEER")) (alert (strcat "I like " (_like))) The function _like is evaluated because it's encompassed within parens. Quote
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.