Turning off Regen/Redraw Temporarily
Is there a way to turn regen/redraw mode to OFF temporarily, so I can create all sorts of entities (mainly dims, mText, lines)... and then regen the drawing?I currently create all entities using the "COMMAND" method: eg-> (command "PLINE" p1 p2 "")I tried changing the REGENMODE system variable, but it didn't change anything.My thinking is that V8 will be as fast as V7 by doing less regens (v7 is 2-3 times faster).thanks in advancesteve marcotte
Comments
-
You could try Viewres, although I am not sure it changes much either.Icad shouldn't do a regen every time you create an entity, even if you do it that way and why on earth do you do it that way?
0 -
I'm self-taught through websites. I studied rocks and tectonics in college, not c++.I should have said: "What is best method to create common entities, remain compatible with Bricscad V7 and still be easy to read.Do i create functions that act a wrapper to an ENTMAKE?Is SDS the way to go? Can i even use this within LISP?This is what I do now:
(command "PLINE" pt4 pt1 pt2 pt3 pt4 "")(COMMAND "TEXT" "J" "C" (list 5.50750 0.924525 0.000000) tsBig 0 sDate)(COMMAND "-insert" "CHECKBOX" (cdr(assoc "E1" pointList)) "1" "1" "0")(command "-mtext" insPt "J" "TR" "H" ts "W" width volTxt "")(COMMAND "LEADER" FILL_PT1 FILL_PT2 "" fillString "")
0 -
Maybe we are at crossed purposes or maybe you advanced to grade 3 without doing grade 1.Lisp (where everything is in braces (((like this)))) and other programming languages within Icad are for making some sort of routine or series of operations based on you doing a minimal of work, like any programming language.The simplest way to create say a line is to just type line (L for short) or pick the relevant toolbar. The manner in which an entity was created has no bearing on its compatibility.Or am I right off the mark?
0 -
If your going to use a lisp program to create 1000 lines, insert 100 blocks, and 400 text entities given some basic input parameters... is it better to generate this lines using ENTMAKE or COMMAND?I do it all with (COMMAND)s now... is it worth it to think about using entmake statements instead?toolbars are for slow-pokes
0 -
Entmake is probably a couple orders of magnitude faster than using command. I would also advise lispers to have a look at using LispEx to interface with the ActiveX object model, for example
(DEFUN C:DOIT ( / activedocument iacadapplication modelspace plist) (vl-load-com) (setq IAcadApplication (vlax-get-acad-object) ActiveDocument (vla-get-ActiveDocument IAcadApplication) ModelSpace (vla-get-ModelSpace ActiveDocument) ) (setq plist '((0 0 0) (0 100 0) (100 100 0) (100 0 0) (0 0 0))) (DrawLwPolyLine ModelSpace plist "0"));;;-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-;;;(DrawLwPolyLine DocSpace (list pt1 pt2 pt3) layer;;;-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-(defun DrawLwPolyLine (DocSpace PointList layer / e plist ptl) (setq ptl PointList plist '() ) (foreach e ptl (setq plist (cons (car e) plist) plist (cons (cadr e) plist) ) ) (vla-put-layer (vla-addLightweightPolyline DocSpace (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble (cons 0 (- (length plist) 1 ) ) ) (reverse plist) ) ) layer ))
0 -
Now I think I have a better understanding of what you are doing, it is correct Entmake is the fastest way in terms of how long it takes entities to be added to the database and show on screen.However that's not to do with Regenmode etc, it's the relative speed of (command) against (entmake).You have to weigh up how much of a bottleneck (command) causes against its relative simplicity. I often have files of over 40,000 entities and use lisp wherever I think it can help - parametric operations, counting, renumbering, attribute manipulation. But there isn't an instance where the speed of a lisp is a holdup on a job.Depends on the type of work.
0 -
Dan: Thats what i was thinking... except useing ENTMAKE instead of VLISP because of compatiblity with BCAD v7. I'll be using VLISP for bcad8 and acad only functions [this will encourage my existing customers to upgrade to v8]John: Thanks for the input. that anwers my question. i was hoping that there was a 2 line fix to increase speed.. but i will take the time to look into making an couple ENTMAKE functions. I'll post them here when I get around to it...thankssteve
0