Autocad user Questions for Bricscad V8
Helloreal impotant issues:First: edit block, for a user who doesn't know lisp how is it possible to edit blockwithout exploding it, i understand refedit is only available in V9.Quick select issue:let's say i'd like to choose all the hatch textures in my drawing in a click or all my blocksor certain layer, how do i quick select it like Autocad does??how exactly can i import the Autocad View & UCS toolbar, what format are those filesstored as?? cui? pgp? if yes how fo i locate them for the view & ucs toolbars?last thing, the pan command shivers or gets turned off & on onced pressed with the wheel onthe mouse, how come?many thanks
Comments
-
ok i have found that "select" command helps to filter my choice, i guess that's the only way in V8.
0 -
Yaacov Lazar's KK and BK work in v8. Available at http://www.bricscad.com/protected/en_INTL/support/forumthread.jsp?id=7682
0 -
And you're welcome to use these simple quick select commands, which work in v8:
;;; --- QL creates a selection set filtered for a specified layer;;; -----------------------------------------------------(defun c:QL () (sssetfirst nil nil)(princ " selects only entities on a specified Layer. Available layer names: ")(setq Lyrlist (vla-get-Layers (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Lyr1 Lyrlist (princ (vla-get-Name Lyr1)) (princ ", ") )(setq LA (getstring "\nEnter layer to select:"))(setq PR (cons 8 LA))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QC creates a selection set filtered for a specified color;;; -----------------------------------------------------(defun c:QC () (sssetfirst nil nil)(princ " selects only entities with a specified color number, such as: ")(princ "\n1=Red 2=Yellow 3=Green 4=Cyan 5=Blue 6=Magenta 7=White 8=Dark 9=Light 256=ByLayer 0=ByBlock.")(setq CO (getint " Enter color to select:"))(setq PR (cons 62 CO))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QY creates a selection set filtered for a specified linetype;;; -----------------------------------------------------(defun c:QY () (sssetfirst nil nil)(princ " selects only entities of a specified Linetype. Available linetype names: ")(setq Ltypelist (vla-get-Linetypes (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Ltype1 Ltypelist (princ (vla-get-Name Ltype1)) (princ ", ") )(setq LT (getstring "\nEnter linetype to select:"))(setq PR (cons 6 LT))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QW creates a selection set filtered by lineweight;;; -----------------------------------------------------(defun c:QW () (sssetfirst nil nil)(princ " selects only entities of a specified Lineweight (specified in hundredths of a mm). ")(setq MM (getint "\nEnter lineweight to select, in mm/100:"))(setq PR (cons 370 MM))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QZ creates a selection set filtered for lineweight = zero;;; (because you can't enter 0 as hundredths of a millimeter in QW);;; -----------------------------------------------------(defun c:QZ () (sssetfirst nil nil)(princ " selects only entities whose lineweight is 0.00 mm. ")(setq PR (cons 370 0))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QB creates a selection set filtered for lineweight = bylayer;;; -----------------------------------------------------(defun c:QB () (sssetfirst nil nil)(princ " selects only entities whose lineweight is Bylayer. ")(setq PR (cons 370 -1))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QT creates a selection set filtered for a specified entity Type;;; -----------------------------------------------------(defun c:QT () (sssetfirst nil nil)(princ " selects only entities of a specified Type. These abbreviations can be used: ")(princ "L=Line, P=lwPolyline, Q=Polyline, A=Arc, C=Circle, E=Ellipse, T=Text, M=Mtext, D=Dimension, J=Leader, I=Insert, H=Hatch, S=Solid")(setq ET (getstring "\nEnter Entity Type to select:"))(if (= ET "l") (setq ET "L")) (if (= ET "L") (setq ET "LINE"))(if (= ET "p") (setq ET "P")) (if (= ET "P") (setq ET "LWPOLYLINE"))(if (= ET "q") (setq ET "Q")) (if (= ET "Q") (setq ET "POLYLINE"))(if (= ET "a") (setq ET "A")) (if (= ET "A") (setq ET "ARC"))(if (= ET "c") (setq ET "C")) (if (= ET "C") (setq ET "CIRCLE"))(if (= ET "e") (setq ET "E")) (if (= ET "E") (setq ET "ELLIPSE"))(if (= ET "t") (setq ET "T")) (if (= ET "T") (setq ET "TEXT"))(if (= ET "m") (setq ET "M")) (if (= ET "M") (setq ET "MTEXT"))(if (= ET "d") (setq ET "D")) (if (= ET "D") (setq ET "DIMENSION"))(if (= ET "j") (setq ET "J")) (if (= ET "J") (setq ET "LEADER"))(if (= ET "i") (setq ET "I")) (if (= ET "I") (setq ET "INSERT"))(if (= ET "h") (setq ET "H")) (if (= ET "H") (setq ET "HATCH"))(if (= ET "s") (setq ET "S")) (if (= ET "S") (setq ET "SOLID"))(setq PR (cons 0 ET))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QS creates a selection set filtered by Text Style;;; -----------------------------------------------------(defun c:QS () (sssetfirst nil nil)(princ " selects only entities with a specified Text Style. These are the available styles: ")(setq TSlist (vla-get-Textstyles (vla-get-activedocument (vlax-get-acad-object))))(vlax-for TS1 TSlist (princ (vla-get-Name TS1)) (princ ", ") )(setq ST (getstring "\nEnter Style to select:"))(setq PR (cons 7 ST))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QD creates a selection set filtered for a specified Dimension Style;;; -----------------------------------------------------(defun c:QD () (sssetfirst nil nil)(princ " selects only entities with a specified Dimension Style. These are the available styles: ")(setq DSlist (vla-get-Dimstyles (vla-get-activedocument (vlax-get-acad-object))))(vlax-for DS1 DSlist (princ (vla-get-Name DS1)) (princ ", ") )(setq DS (getstring "\nEnter DimStyle to select:"))(setq PR (cons 3 DS))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QN creates a selection set filtered for a specified Block Name;;; -----------------------------------------------------(defun c:QN () (sssetfirst nil nil)(princ " selects only blocks, and only of a specified Name. Available names: ")(setq BlkList (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Blk1 BlkList (princ (vla-get-Name Blk1)) (princ ", ") )(setq BL (getstring "\nEnter block name to select:"))(setq PR (cons 2 BL))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- QNX selects all insertions of a specified Block in the entire file;;; -----------------------------------------------------(defun c:testQNX () (sssetfirst nil nil)(princ " selects all blocks of a specified name in the entire file. Available names: ")(setq BlkList (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Blk1 BlkList (princ (vla-get-Name Blk1)) (princ ", ") )(setq BL (getstring "\nEnter block name to select:"))(setq PR (cons 2 BL))(setq ss1 (ssget "X" (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; ----------------------------------------------------- ;;; --- qE selects all the OLE images that Acad LT uses (it can't attach images).;;; -----------------------------------------------------(defun c:QE ()(princ " selects only Ole2frame entities, such as LT's OLE images. ")(setq PR (cons 0 "OLE2FRAME"))(setq ss1 (ssget (list PR)))(command "selgrips" ss1 "")) ;;; -----------------------------------------------------;;; --- qEx selects all the OLE images in the entire file.;;; -----------------------------------------------------(defun c:QEX ()(princ " ... Selecting all Ole2frame entities, such as LT's OLE images, in the entire file. ")(setq PR (cons 0 "OLE2FRAME"))(setq ss1 (ssget "X" (list PR)))(command "selgrips" ss1 "")) ;;; -----------------------------------------------------;;; --- QV selects all the viewports in a file (without selecting the layout tabs);;; -----------------------------------------------------(defun c:QV ()(princ " ... Selecting all Viewports in the entire file. ")(setq ss1 (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))(sssetfirst nil ss1)) ;;; -----------------------------------------------------
0 -
Block edit - you could wblock it, edit and insert it. Or upgrade to V9.Selgrips selects and keeps selected by grips. You can filter by using the aliases such as "P"roperties, "T"ype, "circle" or use the prompt menu. V9 has a filter select system, but I can't get the hang of it.Pressing the mouse wheel works as a middle click on many mice. That works as real time pan while you hold it, with Mbuttonpan set to ON. With Mbuttonpan set to OFF, middle click = snap menu.
0 -
Anthony, once again i don't understand lisp or how to upload a code nore ql command is unrecognized in V8.it would be good if you can guide me through this upload or command.many thanks
0 -
To learn how to use QuickSelect, watch the Quick Select movie on the Bricsys website:http://www.bricsys.com/common/movie.jsp?id=30or read the instructions in the Bricscad Help: User Guide > Modifying Entities > Selecting Entities > Using Quick Select.
0 -
Gary, to use any lisp programs:1. Paste the lisp code into a text file created by Notepad.2. Give that file a .LSP extension in place of the .TXT extension. For example, you could call it:QuickSelect.lsp3. You can store the file anywhere, but let's say you store it in:C:/LispRoutines4. Go to your Bricscad USER SUPPORT folder -- not the support folder that's in the Bricscad folder in Program Files. The path to the user support folder will be something like this:C:/Documents and Settings/Administrator/Application Data/Bricsys/Bricscad/V8/en_US/support5. There may be a file in that user support folder called:On_start.lspIf there isn't, create one using Notepad.6. In the On_start.lsp file, include a line such as this:(load "C:/LispRoutines/QuickSelect.lsp")7. Do the same with the code for the KK and BK programs (I forgot to explain before that those two commands provide a very easy way of editing blocks). Paste the code into a file called BlockEdit.lsp, in that same LispRoutines folder, and add this line to On_start.lsp:(load "C:/LispRoutines/BlockEdit.lsp")Then whenever you start Bricscad those 2 lisp files will automatically be loaded and you'll be able to type KK, BK, QL, QC, etc. at the command line.
0 -
ok, i did that & i thank you for that, 2 problems though.i place the code to notepad & then copy the following to the on_start.lsp file : (load "C:\Documents and Settings\gary\Desktop\bricscad\BricsCAD V8\lisps\eblock.lsp").nothing really happend once i start V8 but once i use the command "appload" i can load lisps, it worked with the quick select code but when i prompted to select entities V8 doesn't recognize my selection.the edit block lisp which was made in the same way with the kk or bk command do not work at all once i use "appload" then here is what i get:"an error has occured: bad argument type ; expected at [strcat] "so what went wrong??thanks again for any assistance.
0 -
Hi Gary,You'll notice Anthony used the "/" path separator instead of the "\" as you did. When working with LISP you will either need to use "/" or "\". This may seem a little odd to you but it is because the "\" is used to form characters we cannot easily type (such as \n for a new line character).Hope that help.
0 -
To edit blocks, use KK first. It will prompt you to select the block, and then to draw a line. It will also insert the block at the start point of that line, and will explode the block. Don't erase that line! Just edit the exploded block, then select everything in the exploded block (but don't select that extra line), and use BK. That revises the block definition and deletes the extra things that KK created. It's very slick once you get the hang of it. I still use it in v9, instead of Refedit.My quick-select commands are filtered selection commands. They filter your selection according to color, layer, or whatever else you specified, ignoring everything that doesn't meet that specification. So if nothing in your selection window meets the specification, nothing will actually get selected, gripped and highlighted.I also have a more advanced version of those quick-select commands. It might be a little more confusing, but it allows you to filter for multiple properties. It doesn't include a Deselect All at the start of each command. So if you use one of those commands while there's already a selection set, it will accept that selection set instead of prompting you to create one, just like the Move command would do. And it will filter that pre-selected set for the new property that you specify, de-selecting everything that doesn't match.For example, you could use QL, specifying "defpoints" and then a selection window. That will select everything in the selection window that's on the Defpoints layer. Then you could use QC, specifying "1" (no selection window this time, assuming that the first command found something on Defpoints layer). That will de-select everything that's selected but isn't red. And then you could use QT, specifying "p". That will de-select anything that's still selected but isn't a polyline. So you'll end up with all the red polylines on Defpoints layer.Here's the advanced version:
;;; --- QL creates a selection set filtered for a specified layer;;; -----------------------------------------------------(defun c:QL ()(princ " selects only entities on a specified Layer. Available layer names: ")(setq Lyrlist (vla-get-Layers (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Lyr1 Lyrlist (princ (vla-get-Name Lyr1)) (princ ", ") )(setq LA (getstring "\nEnter layer to select:"))(setq PR (cons 8 LA))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QC creates a selection set filtered for a specified color;;; -----------------------------------------------------(defun c:QC ()(princ " selects only entities with a specified color number, such as: ")(princ "\n1=Red 2=Yellow 3=Green 4=Cyan 5=Blue 6=Magenta 7=White 8=Dark 9=Light 256=ByLayer 0=ByBlock.")(setq CO (getint " Enter color to select:"))(setq PR (cons 62 CO))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QY creates a selection set filtered for a specified linetype;;; -----------------------------------------------------(defun c:QY ()(princ " selects only entities of a specified Linetype. Available linetype names: ")(setq Ltypelist (vla-get-Linetypes (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Ltype1 Ltypelist (princ (vla-get-Name Ltype1)) (princ ", ") )(setq LT (getstring "\nEnter linetype to select:"))(setq PR (cons 6 LT))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QW creates a selection set filtered by lineweight;;; -----------------------------------------------------(defun c:QW ()(princ " selects only entities of a specified Lineweight (specified in hundredths of a mm). ")(setq MM (getint "\nEnter lineweight to select, in mm/100:"))(setq PR (cons 370 MM))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QZ creates a selection set filtered for lineweight = zero;;; (because you can't enter 0 as hundredths of a millimeter in QW);;; -----------------------------------------------------(defun c:QZ ()(princ " selects only entities whose lineweight is 0.00 mm. ")(setq PR (cons 370 0))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QB creates a selection set filtered for lineweight = bylayer;;; -----------------------------------------------------(defun c:QB ()(princ " selects only entities whose lineweight is Bylayer. ")(setq PR (cons 370 -1))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QT creates a selection set filtered for a specified entity Type;;; -----------------------------------------------------(defun c:QT ()(princ " selects only entities of a specified Type. These abbreviations can be used: ")(princ "L=Line, P=lwPolyline, Q=Polyline, A=Arc, C=Circle, E=Ellipse, T=Text, M=Mtext, D=Dimension, J=Leader, I=Insert, H=Hatch, S=Solid")(setq ET (getstring "\nEnter Entity Type to select:"))(if (= ET "l") (setq ET "L")) (if (= ET "L") (setq ET "LINE"))(if (= ET "p") (setq ET "P")) (if (= ET "P") (setq ET "LWPOLYLINE"))(if (= ET "q") (setq ET "Q")) (if (= ET "Q") (setq ET "POLYLINE"))(if (= ET "a") (setq ET "A")) (if (= ET "A") (setq ET "ARC"))(if (= ET "c") (setq ET "C")) (if (= ET "C") (setq ET "CIRCLE"))(if (= ET "e") (setq ET "E")) (if (= ET "E") (setq ET "ELLIPSE"))(if (= ET "t") (setq ET "T")) (if (= ET "T") (setq ET "TEXT"))(if (= ET "m") (setq ET "M")) (if (= ET "M") (setq ET "MTEXT"))(if (= ET "d") (setq ET "D")) (if (= ET "D") (setq ET "DIMENSION"))(if (= ET "j") (setq ET "J")) (if (= ET "J") (setq ET "LEADER"))(if (= ET "i") (setq ET "I")) (if (= ET "I") (setq ET "INSERT"))(if (= ET "h") (setq ET "H")) (if (= ET "H") (setq ET "HATCH"))(if (= ET "s") (setq ET "S")) (if (= ET "S") (setq ET "SOLID"))(setq PR (cons 0 ET))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QS creates a selection set filtered by Text Style;;; -----------------------------------------------------(defun c:QS ()(princ " selects only entities with a specified Text Style. These are the available styles: ")(setq TSlist (vla-get-Textstyles (vla-get-activedocument (vlax-get-acad-object))))(vlax-for TS1 TSlist (princ (vla-get-Name TS1)) (princ ", ") )(setq ST (getstring "\nEnter Style to select:"))(setq PR (cons 7 ST))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QD creates a selection set filtered for a specified Dimension Style;;; -----------------------------------------------------(defun c:QD ()(princ " selects only entities with a specified Dimension Style. These are the available styles: ")(setq DSlist (vla-get-Dimstyles (vla-get-activedocument (vlax-get-acad-object))))(vlax-for DS1 DSlist (princ (vla-get-Name DS1)) (princ ", ") )(setq DS (getstring "\nEnter DimStyle to select:"))(setq PR (cons 3 DS))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QN creates a selection set filtered for a specified Block Name;;; -----------------------------------------------------(defun c:QN ()(princ " selects only blocks, and only of a specified Name. Available names: ")(setq BlkList (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Blk1 BlkList (princ (vla-get-Name Blk1)) (princ ", ") )(setq BL (getstring "\nEnter block name to select:"))(setq PR (cons 2 BL))(setq ss1 (ssget (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )(command "regen")(command "selgrips" "p" "")) ;;; -----------------------------------------------------;;; --- QNX selects all insertions of a specified Block in the entire file;;; -----------------------------------------------------(defun c:testQNX () (sssetfirst nil nil)(princ " selects all blocks of a specified name in the entire file. Available names: ")(setq BlkList (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object))))(vlax-for Blk1 BlkList (princ (vla-get-Name Blk1)) (princ ", ") )(setq BL (getstring "\nEnter block name to select:"))(setq PR (cons 2 BL))(setq ss1 (ssget "X" (list PR)))(if ss1 (command "selgrips" ss1 "")(progn (princ "\n ...none found.") (princ)) )) ;;; -----------------------------------------------------;;; --- qE selects all the OLE images that Acad LT uses (it can't attach images).;;; -----------------------------------------------------(defun c:QE ()(princ " selects only Ole2frame entities, such as LT's OLE images. ")(setq PR (cons 0 "OLE2FRAME"))(setq ss1 (ssget (list PR)))(command "selgrips" ss1 "")) ;;; -----------------------------------------------------;;; --- qEx selects all the OLE images in the entire file.;;; -----------------------------------------------------(defun c:QEX ()(princ " ... Selecting all Ole2frame entities, such as LT's OLE images, in the entire file. ")(setq PR (cons 0 "OLE2FRAME"))(setq ss1 (ssget "X" (list PR)))(command "selgrips" ss1 "")) ;;; -----------------------------------------------------;;; --- QV selects all the viewports in a file (without selecting the layout tabs);;; -----------------------------------------------------(defun c:QV ()(princ " ... Selecting all Viewports in the entire file. ")(setq ss1 (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))(sssetfirst nil ss1)) ;;; -----------------------------------------------------
0