Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/27/2019 in all areas

  1. I don't know why you are trying a third party application instead of the suggestions for using publish correctly.
    1 point
  2. Please note that there are two types of "closed" polylines. Consider a polyline that forms a closed shape square. It could have 4 defined vertices and the "c" option was used to close it or it could have 5 vertices where the first and last vertices have the same location. The following code will handle open polylines and polylines where the first and last vertex are the same with output per your latest posted request. It will not list the distance for a "closed" polyline where the first and last vertex are not the same but the closed parameter was used. ;POLYVERT - list coordinates of polyline vertices ; ;CAD Studio - www.cadstudio.cz www.cadforum.cz ; modified by lrm 6/27/2019 v4 ; (setq __PV_Delimiter " ") ; or ";" or (chr 9) (setq __PV_DP (getvar "LUPREC")) ; decimal places (command "-units" "" 2 "" "" "" "") (defun C:POLYVERT (/ ent listCOORDINATES PT1) (setq ent (entsel "\nPick POLYLINE to list vertices:")) (if (and ent (wcmatch (cdr (assoc 0 (entget (setq ent (car ent))))) "*POLYLINE" ) ;all types ) ;and (progn (setq listCOORDINATES (PolyVert ent)) ;make list (princ "\nVertex list (x y distance-from-previuos):") (setq pt0 (nth 0 listCOORDINATES) ptStart pt0 ) (foreach PT1 listCOORDINATES ;all vertices (setq d (distance pt0 pt1)) (if (/= pt0 PT1) (progn (princ (strcat "\n" (rtos (car pt0) 2 __PV_DP) __PV_Delimiter (rtos (cadr pt0) 2 __PV_DP) __PV_Delimiter (rtos d 2 __PV_DP) __PV_Delimiter ) ) display XYZ (setq pt0 pt1) ) ; progn ) ; end if ) ;for ; check if first and last vertex are the same (if (> (distance ptStart pt0) 0.001) (progn (princ (strcat "\n" (rtos (car pt0) 2 __PV_DP) __PV_Delimiter (rtos (cadr pt0 ) 2 __PV_DP ) __PV_Delimiter ) ) ) ; progn ) ) ;progn (princ " no polyline selected") ) ;if (princ) ) ; PolyVert ; returns vertices list for any type of polyline (in WCS coordinates) ; arg POLY: polyline to list (ename or vla-object) (defun PolyVert (POLY / par pt1 pt0 lst) (vl-load-com) (setq par (if (vlax-curve-isClosed POLY) (vlax-curve-getEndParam POLY) ; else (1+ (vlax-curve-getEndParam POLY)) ) ) (while (setq pt1 (vlax-curve-getPointAtParam POLY (setq par (- par 1)))) (setq lst (cons pt1 lst)) ) ) ; return lst (princ "\nPOLYVERT command loaded.") (princ)
    1 point
  3. We'll see. There are still so many things dependent upon AutoCAD though. A for instance is the former TSI MAP Software CADmep program, now known as Autodesk Fabrication. These are the tools we are now using in Revit for our sub-contractors. So, how do you edit your FabPart database in Revit? AutoCAD. And I'm okay with that because why rewrite something as robust as FabParts? If a marriage of software works out great, then fine by me. Since Revit introduced FabParts in Revit, and finally solidified it in Revit 2018.2, we have been in hog heaven in my office. Our quality and accuracy has surged to new heights because of it. Unfortunately there are still a ton of issues and pitfalls but it sure is paying the bills and our customers are happy. So I don't know, maybe AutoCAD has crept in enough crevices to continue being relevant for a while. I'm still waiting on a Revit killer for the MEP world. I want a platform that has the MEP designer in mind, not the architect. And I don't want an "add-on" scenario, I want a platform that has it all, ground up, all for MEP users. And I think maybe this is coming. CAD software became industry specific, and now I'd like to see it go further and become discipline specific. -TZ
    1 point
  4. Yes, I think a complete re-write is needed and I hope that it is down the road. I hope that they have already started, if not it might be too late.
    1 point
  5. Exactly. I'm not so sure a "perpetual license" is the answer in today's tech world. How else do you drag people out of using the same version for decades? There are even people on this forum who are still on R14 and while they have heavily customized their software and they produce great things, they are the exception to the rule. It becomes the Microsoft IE6 story if software companies don't do something about it. A company buying a particular version of software and operating it for decades is very different than, say, a company buying equipment and operating it for decades. Software changes - and so does the hardware it's dependent upon. I appreciate the people who do choose to upgrade AutoCAD every year or few years but that's not the case with everyone. If you're on AutoCAD 2009 and earlier then you're not a serious AutoCAD user, with few exceptions (David Bethel for instance). -TZ
    1 point
  6. Meh, as long as I can at least use 1 version back I am OK. Honestly not a big deal. People are free to use "OtherCAD" all they want.
    1 point
  7. The following outputs only the x and y followed by the distance from the previous point all with 2 decimal points. I think that is what you wanted. ;POLYVERT - list coordinates of polyline vertices ; ;CAD Studio - www.cadstudio.cz www.cadforum.cz ; (setq __PV_Delimiter " ") ; or ";" or (chr 9) (setq __PV_DP (getvar "LUPREC")) ; decimal places (command "-units" "" 2 "" "" "" "") (defun C:POLYVERT (/ ent listCOORDINATES PT1) (setq ent (entsel "\nPick POLYLINE to list vertices:")) (if (and ent (wcmatch (cdr (assoc 0 (entget (setq ent (car ent))))) "*POLYLINE" ) ;all types ) ;and (progn (setq listCOORDINATES (PolyVert ent)) ;make list (princ "\nVertex list (x y distance-from-previuos):") (setq pt0 (nth 0 listCOORDINATES)) (foreach PT1 listCOORDINATES ;all vertices (setq d (distance pt0 pt1)) (princ (strcat "\n" (rtos (car PT1) 2 __PV_DP) __PV_Delimiter (rtos (cadr PT1) 2 __PV_DP) __PV_Delimiter (rtos d 2 __PV_DP) __PV_Delimiter ) ) display XYZ (setq pt0 pt1) ) ;for ) ;progn (princ " no polyline selected") ) ;if (princ) ) ; PolyVert ; returns vertices list for any type of polyline (in WCS coordinates) ; arg POLY: polyline to list (ename or vla-object) (defun PolyVert (POLY / par pt1 lst) (vl-load-com) (setq par (if (vlax-curve-isClosed POLY) (vlax-curve-getEndParam POLY) ; else (1+ (vlax-curve-getEndParam POLY)) ) ) (while (setq pt1 (vlax-curve-getPointAtParam POLY (setq par (- par 1)))) (setq lst (cons pt1 lst)) ) ) ; return lst (princ "\nPOLYVERT command loaded.") (princ)
    1 point
×
×
  • Create New...