Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Block Problem

Status
Not open for further replies.

shadow

Computer
Mar 1, 2001
321
0
0
US
ok Have a lot of blocks that need to be created, but each has about 75 or more attributes 40 of which we want the user to be able to input info in. That much i have set up the other attributes are constant and invisible by the attributes dialog ok so that when the block is created all the attributes dont show up except for the ones that are not constant. With me so far. Ok now for the hard part when the user explodes the blocks all the attributes are there shown for the user i dont want this so i found a lsp that makes entities invisible. So I make the block attributes that i dont want edited invisible but doing so makes them unselectable so how do you add them to a block definition? you create a group and when creating this group selecting each in the order I wish the definitions to be prompted in. ok now the group is created i add it to the block definition when i create the block. but low and be hold in doing this the group becomes empty. So does any one know how to either maintain the order of the attributes because this is important or copy a group selection set to a block?
So i dont have to select each attribute in the correct order for each of the 300 blocks i have to make

if everyone helps everybody the world will be a better place
 
Replies continue below

Recommended for you

You could build a selection set using (setq SelSet (ssget)) and then pick attribute definitions in order. When selecting objects to make up block, enter "!ss" for the 'selection set' of attribute definitions to be added to the block.

..that still leaves the problem of adding "invisible" attdefs (by the lisp) to the set. How did you add it to a group? You could do it by setting the attdef's 'name' to a lisp variable, then entering the variable name "!varname" during selection. But doesn't an invisible attribute still show up in the attribute editor dialogue box?
 
well CarlB yes i could do that but the thing is can you make a selection set of invisible objects before you make them invisible. here is the lisp routine i downloaded

;;;CADALYST 09/05 Tip2058: Hide&Show.lsp Turn Objects Invisible or Visible (c) 2005 Andrzej Gumula


;;; [c]2005 Andrzej Gumula, Katowice, Poland
;;; e-mail: a.gumula@wp.pl
;;; This routine allows hide and display any selected entity.


(defun c:InVis (/ SSet Count Elem)

(defun Dxf (Id Obj)
(cdr (assoc Id (entget Obj)))
);end Dxf

(prompt "\nSelect object(s) to hide: ")
(cond
((setq SSet (ssget))
(repeat (setq Count (sslength SSet))
(setq Count (1- COunt)
Elem (ssname SSet Count))
(if (/= 4 (logand 4 (Dxf 70 (tblobjname "layer" (Dxf 8 Elem)))))
(if (Dxf 60 Elem)
(entmod (subst '(60 . 1) (assoc 60 (entget Elem)) (entget Elem)))
(entmod (append (entget Elem) (list '(60 . 1))))
)
(prompt "\nEntity on a locked layer. Cannot hide this entity. ")
);end if
);end repeat
)
);end cond
(princ)
);end c:InVis



(defun c:Vis (/ WhatNextSSet Count Elem)

(defun Dxf (Id Obj)
(cdr (assoc Id (entget Obj)))
);end Dxf

(cond
((setq SSet (ssget "_X" '((60 . 1))))
(initget "Yes No")
(setq WhatNext (cond
((getkword "\nAll hidden entities will be visible. Continue? No, <Yes>: "))
(T "Yes")))
(cond
((= WhatNext "Yes")
(prompt "\nPlease wait...")
(repeat (setq Count (sslength SSet))
(setq Count (1- COunt)
Elem (ssname SSet Count))
(if (/= 4 (logand 4 (Dxf 70 (tblobjname "layer" (Dxf 8 Elem)))))
(entmod (subst '(60 . 0) '(60 . 1) (entget Elem)))
(prompt "\nEntity on a locked layer. Cannot make visible this entity. ")
);end if
);end repeat
(prompt "\nDone...")
)
);end cond
)
(T (prompt "\nNo objects was hidden. "))
);end cond
(princ)
);end c:Vis

(prompt "\n[c]Loade new commands VIS and INVIS. ")
(prompt "\n[c]2005 Andrzej Gumula. ")
(princ)

so try makeing a group of objects then make them invisible add them to a block def then explode and try to make another block with the same group ultimate ly im just trying to save time i added it to the group by picking them in the correct order when i created the group
no invisible attributes dont show up in the attribute edit diag if the hide show lisp is applied :)

hendie
im thinking ahead some times people get curious and i dont want them to kow what i know see i create a set of blocks with attributes that cary date back to me i personally dont care who uses them im going to make them avalable to everyon and anyone who wants them but when i get their drawing back with my blocks i can use it to creat masive bom lists as far as how much of what type of screws they will need

thank you all sorry about no punctuation had to run

if everyone helps everybody the world will be a better place
 
Q: Well CarlB yes i could do that but the thing is can you make a selection set of invisible objects before you make them invisible

A: Yes. So as I said forget the "group" & "block" methods.


If everyone would punctuate the E-tips forum world would be a more understandable place. :)
 
Status
Not open for further replies.
Back
Top