INSERT SYMBOL

I'm going to make a library (valves) and want to break the line when inserting the symbol. How to do it easy? I'm using AutoCad 2006

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@endeco.no wrote:

I am still with 2000, but, how much control do you have over your work?
Many moons ago, when I had do draw valves and such, I wrote this simple little snippet.
(defun c:valve (/ a b c d oldos oldorth oldpl ang pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8 pt9 pt10 size oldlyr lyr ) (setq oldos (getvar "osmode") oldorth (getvar "orthomode") oldlyr (getvar "clayer") oldpl (getvar "plinewid") d (getvar "textsize") ) (if (not VALVE_SIZE) (setq VALVE_SIZE d) ) (if (= (getvar "tilemode") 0) (setq size (/ 1.0 12.0)) (setq size (getint (strcat "\nValve Size <" (rtos VALVE_SIZE) "> :"))) ) (if (/= size nil) (setq VALVE_SIZE size) ) (setvar "orthomode" 1) (setvar "plinewid" 0) (setq a (entsel "\nSelect a Point on your Line: ") z (car a) lyr (cdr (assoc '8 (entget (car a)))) pt5 (osnap (cadr a) "nea") b (cdr (assoc '10 (entget (car a) ))) c (cdr (assoc '11 (entget (car a) ))) ang (angle (cdr (assoc '10 (entget (car a)))) (cdr (assoc '11 (entget (car a))))) pt6 (polar pt5 ang VALVE_SIZE) pt1 (polar pt5 (+ ang (/ pi 2))(setq vs2 (/ (float VALVE_SIZE) 2))) pt3 (polar pt1 ang VALVE_SIZE) pt2 (polar pt1 (+ ang (* 1.5 pi)) VALVE_SIZE) pt4 (polar pt3 (+ ang (* 1.5 pi)) VALVE_SIZE) ) (setvar "osmode" 0) (command "layer" "s" lyr "") (command "pline" pt1 pt2 pt3 pt4 "c") (command "break" z pt5 pt6) (setvar "clayer"oldlyr) (setvar "osmode" oldos) (setvar "orthomode" oldorth) (setvar "plinewid" oldpl) (princ) )
UGLY CODE, NO APPOLOGIES FROM HERE THOUGH.
I am trying to get you to think outside the box. Do you really want to insert blocks? That I cannot answer for you.
If you want to insert blocks because you use attributes for any reason, go for it. But mabye a routine like mine above could draw the symbol from scratch and break the line too. It' pretty much point & shoot.
Simlar, you could use a lisp routine to insert a block and break the line.
For myself, for symbols, I am liking making the outline of the symbol a region, giving it a positive elevation, using HIDE and not breaking the line at all......
must work now.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.