All Activity
- Past hour
-
Why can’t I join two lines even when they look connected?
SLW210 replied to indiancad's topic in AutoCAD 2D Drafting, Object Properties & Interface
That's too much work on a large drawing, if it needs to be on the same elevation, you can Z = 0 (or what ever elevation you want) them individually or the entire drawing. -
Stack Social license
SLW210 replied to Discus84's topic in AutoCAD 2D Drafting, Object Properties & Interface
There are legitimate alternatives to AutoCAD, some Free and some very low priced, I would go that route before getting AutoCAD LT from an iffy at best source. I went and looked them up, they seem to "sell" different software, lot's of bad reviews. - Today
-
I'll try to get to this and finish the Excel today if I can free up some time. I can only test Calc on my home computer, but I'll give it a blind shot at work if I get time, then test and trouble shoot at home. Is the GetLen 2.0.lsp working better in Metric now?
-
PDF Plot Shaded Visual Style = Sawtooth Edge
SLW210 replied to lamensterms's topic in AutoCAD Drawing Management & Output
Normally that would be a DPI issue I would believe, but it appears you are using the same on both computers. If they look the same on all PDF readers and the plot preview the issue is computer related, maybe AutoCAD and the individual Visual Styles Settings. Did you compare the Visual Style Settings in the Visual Styles Manager? -
dongpt1907 joined the community
-
JEContext joined the community
-
kof70 joined the community
-
PDF Plot Shaded Visual Style = Sawtooth Edge
VicoWang replied to lamensterms's topic in AutoCAD Drawing Management & Output
You're welcome. I hope it can be helpful. I want to know how to synchronize the environment configuration of your work computer and home computer at present? ( For example, 20 lisp plug-ins and 10 environment configuration files such as DWT, SHX, etc. are installed) This is a good test site for the synchronization and consistency of VedaCAD plugins and environment profiles, which can support cross-CAD version synchronization. If you are willing to try, I would like to invite you to conduct a double-end Vedacad synchronous test of your working environment: 1. Log in to the account at any end, configure your plug-in and environment configuration file, publish into VCID, and then form a bunch of VCID into a working environment configuration file, and click push to push it to the cloud. 2. Log in to the account at the other end, and through pull, the whole working environment will be synchronized in tens of seconds and can be used directly. -
PDF Plot Shaded Visual Style = Sawtooth Edge
lamensterms replied to lamensterms's topic in AutoCAD Drawing Management & Output
Thanks guys @SLW210 Drivers are up to date on both machines, and I agree the GPUs are significantly difference performance-wise, it's interesting that the better GPU gives worse results The preview seems a bit buggy, it's heavily pixelated and won't let me zoom in to see closer detail. Tried high-res and low-res preview and both are buggy (work PC - will check home later) Tested on PDF-XChange, Bluebeam Revu, Adobe Reader and Edge browser - all display the same No high quality PC3 on these versions @VicoWang Thanks for the suggesion - I will take a look! -
@Tsuky works well maybe an option to set the number of facets for an arc etc. So get a high curve look alike.
- Yesterday
-
I will do a lisp for Librecalc should only need 3 defuns Open, Read and Write. Something like this would be front end, created by using Multi radio buttons.lsp, just don't delete the DCL then can load that dcl or add to your lisp code. Having problems opening Libre calc will work out why. Can open a ODS etc so Calc is working.
-
Create bounding box
Paul Li replied to Discus84's topic in AutoCAD 2D Drafting, Object Properties & Interface
Well your ai generated version actually serves a little different purpose. Here's Lee Mac's version which when given obj (which is a vla object) returns a list of 4 points that represent the 4 corners of the bounding box: ; https://www.lee-mac.com/boundingbox.html ;; Bounding Box - Lee Mac ;; Returns the point list describing the rectangular frame bounding the supplied object. ;; obj - [vla] VLA-Object (defun LM:boundingbox ( obj / a b lst ) (if (and (vlax-method-applicable-p obj 'getboundingbox) (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-getboundingbox (list obj 'a 'b)))) (setq lst (mapcar 'vlax-safearray->list (list a b))) ) (mapcar '(lambda ( a ) (mapcar '(lambda ( b ) ((eval b) lst)) a)) '( (caar cadar) (caadr cadar) (caadr cadadr) (caar cadadr) ) ) ) ) The section of the ai code that kind of matches this is here: ;; Safely catch objects that do not support a bounding box (if (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-getboundingbox (list vlaObj 'minPt 'maxPt)))) (progn (setq pt1 (vlax-safearray->list minPt) pt2 (vlax-safearray->list maxPt)) But in this case vlaObj is the variable that represent the vla object. Also instead of a list of 4 points, what's returned are 2 variables pt1 and pt2 each representing the lower left & the upper right corners of the bounding box. Then the ai code goes further by comparing these 2 points with 2 points from previous selected object cycling through all selected objects ultimately concluding with the least minimum or lowest left corner point minExt and the maximum or greatest upper right corner point maxExt: ;; Initialize or update the overall minimum and maximum coordinates (if (not minExt) (setq minExt pt1 maxExt pt2) (setq minExt (mapcar 'min pt1 minExt) maxExt (mapcar 'max pt2 maxExt)) ) Finally, the ai code concludes by drawing a single bounding box using these 2 corner points with the rectangle command: ;; Draw a standard rectangle using the global coordinates (command "_.rectangle" minExt maxExt) -
Stack Social license
Paul Li replied to Discus84's topic in AutoCAD 2D Drafting, Object Properties & Interface
I would not trust any other reseller either other than Autodesk or an Authorized Autodesk reseller. There are many posts on various forums where users purchased a license from another seller and then could not activate the license. You can find a list of authorized resellers on here: https://www.autodesk.com/support/partners?locations=United States&offerings=software_purchase -
Why do some objects disappear when you plot a DWG?
Paul Li replied to indiancad's topic in AutoCAD 2D Drafting, Object Properties & Interface
There are times where everything is on and thawed in Model but when plotting in Paperspace certain layers don't show up. Other than checking the Vplayer settings inside Pspace Vports, I would also check the Vplayer settings in Paperspace itself since AutoCAD treats that as a vport as well. -
@gile, Did not know that. At least I learned something while doing mine. I've look at the extension and there are many interesting things in there.
-
Steven P started following Getting Error message on opening Cadtutor.
-
From another forum earlier - they have a 'too many requests' page appearing - a side effect of an anti- Al screening thing to stop the bots a little
-
Why can’t I join two lines even when they look connected?
Paul Li replied to indiancad's topic in AutoCAD 2D Drafting, Object Properties & Interface
I would first make sure they have the same elevation (z value). Then I would grip the end point of one of the lines and drag that grip point to the end point of the other line. Finally try Pedit again to join the two. -
Another way to do it: transform lines, polylines/polyarcs, circles or arcs into mutilines. This way we retain the properties of the chosen multiline style. Arcs are simulated with segments. ;; ListBox (gile) ;; Boite de dialogue permettant un ou plusieurs choix dans une liste ;; ;; Arguments ;; title : le titre de la boite de dialogue (chaîne) ;; msg ; message (chaîne), "" ou nil pour aucun ;; keylab : une liste d'association du type ((key1 . label1) (key2 . label2) ...) ;; flag : 0 = liste déroulante ;; 1 = liste choix unique ;; 2 = liste choix multipes ;; ;; Retour : la clé de l'option (flag = 0 ou 1) ou la liste des clés des options (flag = 2) ;; ;; Exemple d'utilisation ;; (listbox "Présentation" "Choisir une présentation" (mapcar 'cons (layoutlist) (layoutlist)) 1) (defun ListBox (title msg keylab flag / tmp file dcl_id choice) (setq tmp (vl-filename-mktemp "tmp.dcl") file (open tmp "w") ) (write-line (strcat "ListBox:dialog{label=\"" title "\";") file ) (if (and msg (/= msg "")) (write-line (strcat ":text{label=\"" msg "\";}") file) ) (write-line (cond ((= 0 flag) "spacer;:popup_list{key=\"lst\";") ((= 1 flag) "spacer;:list_box{key=\"lst\";") (T "spacer;:list_box{key=\"lst\";multiple_select=true;") ) file ) (write-line "}spacer;ok_button;}" file) (close file) (setq dcl_id (load_dialog tmp)) (if (not (new_dialog "ListBox" dcl_id)) (exit) ) (start_list "lst") (mapcar 'add_list (mapcar 'cdr keylab)) (end_list) (action_tile "accept" "(or (= (get_tile \"lst\") \"\") (if (= 2 flag) (progn (foreach n (str2lst (get_tile \"lst\") \" \") (setq choice (cons (nth (atoi n) (mapcar 'car keylab)) choice)) ) (setq choice (reverse choice)) ) (setq choice (nth (atoi (get_tile \"lst\")) (mapcar 'car keylab))) ) ) (done_dialog)" ) (start_dialog) (unload_dialog dcl_id) (vl-file-delete tmp) choice ) (defun def_bulg_pl (ls lb flag_closed / ls lb rad a l_new) (if (not (zerop flag_closed)) (setq ls (append ls (list (car ls))))) (while (cadr ls) (if (zerop (car lb)) (setq l_new (append l_new (list (car ls)))) (progn (setq rad (/ (distance (car ls) (cadr ls)) (sin (* 2.0 (atan (abs (car lb))))) 2.0) a (- (/ pi 2.0) (- pi (* 2.0 (atan (abs (car lb)))))) ) (if (< a 0.0) (setq a (- (* 2.0 pi) a))) (if (or (and (< (car lb) 0.0) (> (car lb) -1.0)) (> (car lb) 1.0)) (setq l_new (append l_new (reverse (cdr (reverse (bulge_pts (polar (car ls) (- (angle (car ls) (cadr ls)) a) rad) (car ls) (cadr ls) rad (car lb))))))) (setq l_new (append l_new (reverse (cdr (reverse (bulge_pts (polar (car ls) (+ (angle (car ls) (cadr ls)) a) rad) (car ls) (cadr ls) rad (car lb))))))) ) ) ) (setq ls (cdr ls) lb (cdr lb)) ) (append l_new (list (car ls))) ) (defun bulge_pts (pt_cen pt_begin pt_end rad sens / inc ang nm p1 p2 lst) (setq inc (angle pt_cen (if (< sens 0.0) pt_end pt_begin)) ang (+ (* 2.0 pi) (angle pt_cen (if (< sens 0.0) pt_begin pt_end))) nm (fix (/ (rem (- ang inc) (* 2.0 pi)) (/ (* pi 2.0) 36.0))) ) (repeat nm (setq p1 (polar pt_cen inc rad) inc (+ inc (/ (* pi 2.0) 36.0)) lst (append lst (list p1)) ) ) (setq p2 (polar pt_cen ang rad) lst (append lst (list p2)) ) (if (< sens 0.0) (reverse lst) lst) ) (defun c:polyarc2ml ( / jspl nbr l_mlstyl sel_styl ent dxf_ent typent name_layer closed lst l_bulg e_next dxf_next oldlayer oldosm key_mod scale_ml) (princ "\nSelect polylines/lines/circles/arcs for transform to multilines: ") (setq jspl (ssget '((0 . "*POLYLINE,LINE,CIRCLE,ARC") (-4 . "<NOT") (-4 . "&") (70 . 124) (-4 . "NOT>"))) nbr 0 ) (cond (jspl (setq l_mlstyl (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 3)) (dictsearch (namedobjdict) "ACAD_MLINESTYLE") ) ) ) (while (not (setq sel_styl (listbox "Multilines style" "Choose a Multiline style" (mapcar 'cons l_mlstyl l_mlstyl) 1)))) (setvar "cmlstyle" sel_styl) (initget "Top Zero Bottom") (setq key_mod (getkword (strcat "\nGive justification type [Top/Zero/Bottom] <" (cond ((eq (getvar "cmljust") 0) "Top" ) ((eq (getvar "cmljust") 1) "Zero" ) ((eq (getvar "cmljust") 2) "Bottom" ) ) ">: " ) ) ) (if key_mod (cond ((eq key_mod "Top") (setvar "cmljust" 0)) ((eq key_mod "Zero") (setvar "cmljust" 1)) ((eq key_mod "Bottom") (setvar "cmljust" 2)) ) ) (setq scale_ml (getdist (strcat "\nGive scale for multiline <" (rtos (getvar "cmlscale")) ">: "))) (if scale_ml (setvar "cmlscale" scale_ml)) (setq oldlayer (getvar "clayer") oldosm (getvar "osmode")) (setvar "osmode" 0) (setvar "cmdecho" 0) (command "_.ucs" "_world") (repeat (sslength jspl) (setq typent (cdr (assoc 0 (setq dxf_ent (entget (setq ent (ssname jspl nbr)))))) name_layer (cdr (assoc 8 dxf_ent)) ) (cond ((eq typent "LWPOLYLINE") (setq closed (boole 1 (cdr (assoc 70 dxf_ent)) 1) lst (mapcar '(lambda (x) (trans x ent 1)) (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) dxf_ent))) l_bulg (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 42)) dxf_ent)) lst (def_bulg_pl lst l_bulg closed) ) ) ((eq typent "POLYLINE") (setq closed (boole 1 (cdr (assoc 70 dxf_ent)) 1) e_next (entnext ent) ) (while (= "VERTEX" (cdr (assoc 0 (setq dxf_next (entget e_next))))) (if (zerop (boole 1 223 (cdr (assoc 70 dxf_next)))) (setq lst (cons (trans (cdr (assoc 10 dxf_next)) ent 1) lst) l_bulg (cons (cdr (assoc 42 dxf_next)) l_bulg) ) ) (setq e_next (entnext e_next)) ) (setq lst (reverse lst) l_bulg (reverse l_bulg) lst (def_bulg_pl lst l_bulg closed) ) ) ((eq typent "LINE") (setq lst (list (trans (cdr (assoc 10 dxf_ent)) 0 1) (trans (cdr (assoc 11 dxf_ent)) 0 1)) closed 0 ) ) ((eq typent "CIRCLE") (setq lst (bulge_pts (trans (cdr (assoc 10 dxf_ent)) ent 1) (polar (trans (cdr (assoc 10 dxf_ent)) ent 1) 0.0 (cdr (assoc 40 dxf_ent))) (polar (trans (cdr (assoc 10 dxf_ent)) ent 1) (- (* 2.0 pi) (/ (* pi 2.0) 36.0)) (cdr (assoc 40 dxf_ent))) (cdr (assoc 40 dxf_ent)) 1 ) lst (append lst (list (car lst))) closed 1 ) ) ((eq typent "ARC") (setq lst (bulge_pts (trans (cdr (assoc 10 dxf_ent)) ent 1) (polar (trans (cdr (assoc 10 dxf_ent)) ent 1) (cdr (assoc 50 dxf_ent)) (cdr (assoc 40 dxf_ent))) (polar (trans (cdr (assoc 10 dxf_ent)) ent 1) (cdr (assoc 51 dxf_ent)) (cdr (assoc 40 dxf_ent))) (cdr (assoc 40 dxf_ent)) 1 ) closed 0 ) ) ) (cond (lst (setvar "clayer" name_layer) (command "_.mline") (foreach n lst (command n)) (if (not (zerop closed)) (command "_close") (command "")) (entdel ent) ) ) (setq nbr (1+ nbr) lst nil l_bulg nil) ) (command "_.ucs" "_previous") (setvar "clayer" oldlayer) (setvar "osmode" oldosm) (setvar "cmdecho" 1) ) (T (princ "\nSelect is empty")) ) (prin1) )
-
gile started following KDTree as a NET application.
-
Hi, The GeometryExtensions.NET library provides a generic KdTree<T> class which uses parallel computation for building the tree. It also provides an example of Point3dTree class but can used with any type of object providing a 'getPosition' function. // public KdTree(IEnumerable<T> source, Func<T, Point3d>?getPosition, int dimension) var tree = new KdTree<BlockReference>(blockList, br => br.Position, 2);
-
VicoWang started following A new get length LISP , PDF Plot Shaded Visual Style = Sawtooth Edge and Getting Error message on opening Cadtutor.
-
PDF Plot Shaded Visual Style = Sawtooth Edge
VicoWang replied to lamensterms's topic in AutoCAD Drawing Management & Output
you can try pdfFactory, which is a system-level virtual printer that allows for limited editing during the printing process, such as adjusting the order, rotating individual pages, etc. When used with a CAD batch printing plugin, it can directly generate a multi-page high-precision CAD print PDF file. -
I often encounter 500 errors here as well. I've always thought it was a necessary test for the upgrade to version 5, so I refresh it several times, and it can be refreshed successfully.
-
At that time, welcome to publish it to the VedaCAD plugin ecosystem. If you want to keep it open source, you can even directly publish it in LSP format (the one downloaded to the local sandbox via VCID is also in LSP).
-
[LISP plugin] Smart Break-a tool for quickly breaking line objects
VicoWang replied to VicoWang's topic in AutoLISP, Visual LISP & DCL
Good eye! To be honest, this is simply a lightweight wrapper around the native ._BREAK command — no custom vlax-curve stuff here. It just passes the pick points directly to CAD. So for edge cases like 3D Polylines or closed objects (PELLIPSE = 1), it completely inherits standard AutoCAD behavior (and its native limitations). Here is the source code so you can see exactly what it's doing under the hood: ;; ----------------------------------------------------------------------------- ;; Plugin Name: Smart Break ;; Version: 1.0 ;; Author: Vico ;; Description: A smarter break command for Line, Polyline, Circle, Arc, Ellipse, ;; and Spline objects. Supports both single-point and two-point break operations. ;; ----------------------------------------------------------------------------- (defun c:SB ( / *error* old_osmode old_cmdecho ent pt1 pt2 ) (defun *error* ( msg ) (if old_osmode (setvar "OSMODE" old_osmode)) (if old_cmdecho (setvar "CMDECHO" old_cmdecho)) (princ) ) (setq old_osmode (getvar "OSMODE")) (setq old_cmdecho (getvar "CMDECHO")) (setvar "OSMODE" 545) (setvar "CMDECHO" 0) (if (setq ent (entsel "\nSelect object to break: ")) (if (setq pt1 (getpoint "\nSpecify first break point: ")) (progn (setq pt2 (getpoint pt1 "\nSpecify second break point <Press ENTER for single point>: ")) (if (not pt2) (setq pt2 pt1) ) (vl-cmdf "._BREAK" ent "_F" "_non" pt1 "_non" pt2) ) ) ) (setvar "OSMODE" old_osmode) (setvar "CMDECHO" old_cmdecho) (princ) ) (princ "\nSmart Break v1.0 by Vico loaded. Type SB to execute.") (princ) -
I'm at home today, back at work tomorrow. I can do it, just need the time. I quickly tested this at home on 2000i and it looks to be working fine. I do believe I have everything working Except the direct to MS Excel on LibreOffice Calc. I have posted an updated LISP in the first post.
-
[LISP plugin] Smart Break-a tool for quickly breaking line objects
SLW210 replied to VicoWang's topic in AutoLISP, Visual LISP & DCL
Does it break an Ellipse that was created with PELLIPSE = 1, which is the old style Polyline, a.k.a. Heavy Polyline and 2D Polyline? 3D Polylines? -
I forgot all about Govert's programs. I use them on the home computers that have AutoCAD 2000i.
-
I've been getting those randomly as well at home on Firefox and work on Edge.
-
PDF Plot Shaded Visual Style = Sawtooth Edge
SLW210 replied to lamensterms's topic in AutoCAD Drawing Management & Output
It is most likely the graphics cards/drivers. They show a large difference in performance benchmarks. Are the drivers up to date? Do they look better in the AutoCAD plot preview? What are you using to view PDFs? Do those older AutoCAD versions have the High Quality PDF plotter?
