Jump to content

Linetypes and or Lisps needed


Recommended Posts

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

Posted
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)?

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

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

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

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

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

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