Jump to content

Leaderboard

  1. Lee Mac

    Lee Mac

    Trusted Members


    • Points

      17

    • Content Count

      19,846


  2. dlanorh

    dlanorh

    Community Members


    • Points

      13

    • Content Count

      295


  3. Grrr

    Grrr

    Trusted Members


    • Points

      9

    • Content Count

      1,567


  4. hanhphuc

    hanhphuc

    Community Members


    • Points

      6

    • Content Count

      807



Popular Content

Showing content with the highest reputation since 10/19/2018 in all areas

  1. 3 points
    Interesting to say the least. It started with the news that Hexagon PPM are the new owners of Bricscad. But my main interest of the day has been the new and improved tools that have been showcased I won't even attempt to describe them, I couldn't do it justice, but if you follow Bricscad keep an eye out in the next couple of days for the videos from the conference there are some truly impressive improvements to what in my mind is already a winning software package. It will be interesting to see what day 2 brings.
  2. 2 points
    I wrote a quick Lisp to map an image onto a ... "sphere". Sometime in the (near?) future I will try to improve it, for the moment the image resolution is poor. I used a 3d mesh and AutoCAD limits its dimensions do 256x256. If someone wants to play with the lisp I wrote, draw a 2d shape starting from point 100,0,0 to right. Use a solid hatch on the closed shapes, enter the PLAN command, and maybe do a zoom to "extents". Start the lisp by typing "Miki" and... wait. On my computer it took almost 2 minutes to create the model. Have fun! CADTutor.LsP
  3. 2 points
    The vast majority of the feedback I've received about the new forum software has been positive and I'm very grateful to everyone who flagged up issues and contributed to making the migration a success. Now that the dust has settled, it's a good time to hone your skills. There is way more to the Invision Community interface than it initially appears, so I thought you might like a link to this blog post from the developers. I'm sure you'll find something useful here that will make your forum interactions even better. 5 Secret Interface Tips If you have a top tip for using this forum, just add it to this thread.
  4. 2 points
    In fact my intention was simple, in order to clean up the [BBcodes] within the new code tags in this forum. Therefore, IMO optimized with CLIPBOARD without using 'getfiled' is much more convenient, isn't it? code updated - post#1 Copy text (from forum) -> run 'FORUM' (in ACAD) -> [Ctrl+V] Paste (in forum active editor) Done!
  5. 2 points
  6. 2 points
    Nice one Grrr. Having all the settings right in front of you and ready to use is definitely faster than Layer Manager, especially when you use a large number of layers. I've made this lisp for my own use and, because of my working style (same CTB used for a long time based on colors only, no LineWeight, no True Colors), layer name and the color is just fine. Adding more features makes it slow and you can lose almost any advantage over the Layer Manager. Again, my simple lisp was exactly what I needed. Anyway, the ORIGINAL idea was not the speed! If you test my lisp, when you pre-select some objects then run the lisp, in the end all selected objects will be on the new created layer, and that is how I use it.
  7. 2 points
    Here is the original code for my function: http://www.theswamp.org/index.php?topic=46438.msg514570#msg514570 Here is another implementation of the method: http://www.theswamp.org/index.php?topic=45220.msg504240#msg504240 And here is the likely source of where you found the code in your post: http://www.theswamp.org/index.php?topic=45700.msg508403#msg508403
  8. 2 points
    ;; total length by linetype (defun total_length ( ss linetype / i enttype ltp ent total) (setq i 0 total 0.0 ) (repeat (sslength ss) (setq ent (ssname ss i)) ;; make sure it's a line or polyline (setq enttype (cdr (assoc 0 (entget ent)))) (if (or (= enttype "LWPOLYLINE") (= enttype "POLYLINE") (= enttype "LINE")) (progn ;; see if the line type corresponds (setq ltp (cdr (assoc 6 (entget ent)))) (if (= linetype ltp) (progn (setq total (+ total (vla-get-length (vlax-ename->vla-object ent)))) )) )) (setq i (+ i 1)) ) total ) (defun hatch_surface ( ss color ptrn / i total) (setq i 0 total 0.0 ) (repeat (sslength ss) (setq ent (ssname ss i)) ;; make sure it's a hatch (setq enttype (cdr (assoc 0 (entget ent)))) (if (= enttype "HATCH") (progn ;; by color (if (/= color nil) (progn (if (= color (cdr (assoc 62 (entget ent))) ) (setq total (+ total (vla-get-area (vlax-ename->vla-object ent)))) ) )) ;; by pattern (if ptrn (progn (if (= ptrn (cdr (assoc 2 (entget ent))) ) (setq total (+ total (vla-get-area (vlax-ename->vla-object ent)))) ) )) )) (setq i (+ i 1)) ) total ) (defun blocks_by_name (ss blkname / total i ent) (setq i 0 total 0 ) (repeat (sslength ss) (setq ent (ssname ss i)) (if (and (= "INSERT" (cdr (assoc 0 (entget ent)))) (= blkname (cdr (assoc 2 (entget ent)))) ) (setq total (+ total 1)) ) (setq i (+ i 1)) ) total ) (defun c:TL ( / ss) (vl-load-com) ;; all entities (setq ss (ssget "_X") ) (princ "\nFENCELINE1: ") (princ (total_length ss "FENCELINE1")) (princ "\nFENCELINE2: ") (princ (total_length ss "FENCELINE2")) (princ "\nGAS_LINE: ") (princ (total_length ss "GAS_LINE")) (princ "\nHOT_WATER_SUPPLY: ") (princ (total_length ss "HOT_WATER_SUPPLY")) (princ "\nHatch color 152: ") (princ (hatch_surface ss 152 nil)) (princ "\nHatch color 30: ") (princ (hatch_surface ss 30 nil)) (princ "\nHatch pattern HEX: ") (princ (hatch_surface ss nil "HEX")) (princ "\nHatch pattern ANSI31: ") (princ (hatch_surface ss nil "ANSI31")) (princ "\nHatch pattern SOLID: ") (princ (hatch_surface ss nil "SOLID")) (princ "\nBlocks oooo: ") (princ (blocks_by_name ss "oooo")) (princ "\nBlocks bbbb: ") (princ (blocks_by_name ss "bbbb")) (princ) )
  9. 1 point
    Maybe you could use THIS in conjunction with THIS? Better yet, use Elepanov's Triangulate code to generate the network between the blocks then use the the Dijkstra code.
  10. 1 point
    If the second example is desired, you could use my numinc:incrementalpha function which appears on lines 4,375-4,427 of my Incremental Numbering Suite application. For example: _$ (numinc:incrementalpha "15.QF9" 1) "15.QG0" _$ (numinc:incrementalpha "15.QF9" 10) "15.QG9" _$ (numinc:incrementalpha "15.QF9" 100) "15.QP9" _$ (numinc:incrementalpha "15.QF9" 1000) "15.UB9" That's very flattering of you to say Steven - though, we all stand on the shoulders of giants and were all a beginner once
  11. 1 point
    Hi @dlanorh Have a look at the following: (vl-string-right-trim ".dwg" "my drawing.dwg") And this: (vl-filename-base (getvar 'dwgname))
  12. 1 point
    I would suggest copying your Dimension Style, changing the colour properties as appropriate and then applying such style to your selection of dimensions - this way, your drawing will not contain objects with overrides.
  13. 1 point
    With a little reading, you could have saved you & your reseller some time - You can lead a horse to water...
  14. 1 point
    Also if its a pline you can get all the info Lee-mac has a real nice pline segment report lisp.
  15. 1 point
    It's been a while, but what I probably would have done is create an alignment to follow the right of way. You can pull the B&D from the alignment to a table, freeze the alignments, done.
  16. 1 point
    FWIW, another way: (if (mapcar 'set '(ent pnt) (entsel)) (setq obj (vlax-ename->vla-object ent)) )
  17. 1 point
    FWIW (wcmatch str "*<*,*>*,*/*,*\\*,*:*,*;*,*`?*,*`**,*|*,*`,*,*=*,*``*") can be (not (snvalid str ) )
  18. 1 point
    Let me know if you need some. Mostly 2D. Some 3D. Several Dynamic. Primarily P&ID type stuff.
  19. 1 point
    Hi all. I am interested in getting hands on experience with Revit and BIM. So far I have watched a number of videos of how the software works, but would be interested in attending a course or undertaking e-learning. What would be the best approach for me to take? I live in Birmingham, UK, and have come across some organisations which run 1 and 2 day courses so am aware that is one option, however those are pretty expensive. Thanks
  20. 1 point
    Yes, it's GIS; however AutoCAD is the platform used by another program. It is not inserted, it is scraped in and just LOOKS like it's AutoCAD, but it's not...it's all vertices and points and coordinates and lines. The two-layer system is interesting. One I brought up was to use a layer/single color for DESIGNED equipment, then change it to the "correct" layers/colors after the construction asbuilt for AS-BUILT equipment. This is really going outside of the way it has been done for probably decades, so I'm not sure how it will be received. Thank you for the suggestion!
  21. 1 point
    Late to the party, and I don't do ducting, but Lee Mac has a great lisp, which might interest you. http://www.lee-mac.com/mpline.html Thanks Lee! When in doubt, check Lee Mac out.
  22. 1 point
  23. 1 point
    Going through Engineering Drawing with Worked Examples 1 by M.A.Parker and F.Pickup (first published 1960) and creating models as per the drawings. Got to final problem Flange Coupling (p.219-220). I've created the parts as per the drawings (Flange 2 off, Driving Pin 4 off, Bush 4 off, Washer 8 off) but now need to assemble. I'm not a mechanical engineer so I don't know how to proceed even though the text gives some indication as to the assembling "....The driving pins are attached to each flange alternatively by a nut (they give a note in the drawings "also required 8 off Hex Nuts M10-6H") and washer. The bushes are centrally placed in the 28mm diamater bores and retained on the driving pins by a nut and washer. Note that the parts are assembled so that there is a gap between the flanges and shaft ends".... Do I need to create a shaft? I know I need to create a suitable key but will have to gen up on Inventor's Generators first. Anyone in a position to construct an assembly drawing (not an .iam as I want to assemble myself). Thanks in advance. PS. Have those familiar with the book mentioned above ever seen Engineering Drawing with Worked Examples 2. Seems extremely difficult to get hold off!!! Bush.ipt Driving Pin.ipt Flange.ipt Washer.ipt
  24. 1 point
    Another: (defun c:arrow ( / di nm p1 p2 ) (if (and (setq p1 (getpoint "\nArrow Head: ")) (setq p2 (getpoint "\nTail Point: " p1)) (setq di (/ (distance p1 p2) 3.0) nm (trans '(0. 0. 1.) 1 0 t) ) ) (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 3) '(70 . 0) (cons 10 (trans p1 1 nm)) '(40 . 0.0) (cons 41 (/ di 2.0)) (cons 10 (trans (polar p1 (angle p1 p2) di) 1 nm)) (cons 10 (trans p2 1 nm)) (cons 210 nm) ) ) ) (princ) ) @pBe: Why convert to a VLA-Object?
  25. 1 point
    One more modification for one step Undo, [Length/Undo] in command line and restoring default polyline width: (defun c:duct(/ oldWd oldFil oldEch lEnt pl1 actDoc pl2 vLst1 vLst2 stLst *error* oldWid) (vl-load-com) (defun GetPlineVer(plObj) (mapcar 'cdr (vl-remove-if-not '(lambda(x)(=(car x)10)) (entget plObj))) ); end of GetPLineVer (defun asmi-LayersUnlock(/ restLst) (setq restLst '()) (vlax-for lay (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object))) (setq restLst (append restLst (list (list lay (vla-get-Lock lay) (vla-get-Freeze lay) ); end list ); end list ); end append ); end setq (vla-put-Lock lay :vlax-false) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-Freeze(list lay :vlax-false))) t) ); end vlax-for restLst ); end of asmi-LayersUnlock (defun asmi-LayersStateRestore(StateList) (foreach lay StateList (vla-put-Lock(car lay)(cadr lay)) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-Freeze(list(car lay)(nth 2 lay)))) t) ); end foreach (princ) ); end of asmi-LayersStateRestore (defun *error*(msg) (if(and oldEch oldFil) (progn (setvar "CMDECHO" oldEch) (setvar "FILLMODE" oldFil) (setvar "PLINEWID" oldWid) ); end progn ); end if (if actDoc (vla-EndUndoMark actDoc) ); end if (princ) ); end of *error* (if(not duct:pWd)(setq duct:pWd 1.0)) (setq oldWd duct:pWd duct:pWd(getdist (strcat "\nSpecify pipe diameter <" (rtos duct:pWd) ">: ")) oldFil(getvar "FILLMODE") oldEch(getvar "CMDECHO") oldWid(getvar "PLINEWID") ); end setq (if(null duct:pWd)(setq duct:pWd oldWd)) (mapcar 'setvar '("CMDECHO" "FILLMODE") '(0 0)) (if(entlast)(setq lEnt(entlast))) (vla-StartUndoMark (setq actDoc (vla-get-ActiveDocument (vlax-get-acad-object)))) (princ "\nSpecify start point: ") (command "_.pline" pause) (command "_w" duct:pWd duct:pWd) (while(= 1(getvar "CMDACTIVE")) (command pause) (princ "\nSpecify next point or [Length/Undo]: ") ); end while (if (not (equal lEnt(entlast))) (progn (setq lEnt(entlast) stLst(asmi-LayersUnlock)) (command "_.fillet" "_r" duct:pWd) (command "_.fillet" "_p" lEnt) (setq lEnt (vlax-ename->vla-object lEnt) pl1(car(vlax-safearray->list (vlax-variant-value (vla-Offset lEnt (/ duct:pWd 2))))) pl2(car(vlax-safearray->list (vlax-variant-value (vla-Offset lEnt (-(/ duct:pWd 2)))))) vLst1(GetPlineVer (vlax-vla-object->ename pl1)) vLst2(GetPlineVer (vlax-vla-object->ename pl2)) ); end setq (vla-put-ConstantWidth pl1 0.0) (vla-put-ConstantWidth pl2 0.0) (vla-Delete lEnt) (asmi-LayersStateRestore stLst) (foreach itm vLst1 (command "._line" itm (car vLst2) "") (setq vLst2(cdr vLst2)) ); end foreach ); end progn ); end if (vla-EndUndoMark actDoc) (setvar "CMDECHO" oldEch) (setvar "FILLMODE" oldFil) (setvar "PLINEWID" oldWid) (princ) ); end of c:duct
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
×