Jump to content

All Activity

This stream auto-updates

  1. Today
  2. mhupp

    Hybrid parallel

    Why there is deviation depending on selection order at least for mine. the lisp looks for the poly that has the most vertx and uses that to calculate points off of. if the polylines have the same number the it goes by selection order. I suspect all of these lisps fall short because the points are only being calculated from poly1 to poly2. were your manual way the other half of the points are need from poly2 back to poly1. So you need to run it twice get all the vertx mid points from p1 closest to p2 get all the vertx mid points from p2 closest to p1 The hard part the hard part is then puting them in the right order to draw the mid polyline correctly. im setting the first point and then getting the closest point, should work for what you want to do but could give 0 length segments or out of order. -edit added in @SLW210 test if for selecting polylines ;;----------------------------------------------------------------------------;; ;; POLY AVERAGE between polylines, Finds the mid point avg between close polylines donut shape (defun c:CLOSEPOLYAVG (/ sel1 sel2 ent1 ent2 i ptv ptc mid pts polylst) (setq ent1 (car (entsel "\nSelect first polyline: "))) (if (not (and ent1 (= (cdr (assoc 0 (entget ent1))) "LWPOLYLINE"))) (progn (princ "\nInvalid first selection.") (exit)) (vlax-ename->vla-object ent1) ) (setq ent2 (car (entsel "\nSelect first polyline: "))) (if (not (and ent2 (= (cdr (assoc 0 (entget ent2))) "LWPOLYLINE"))) (progn (princ "\nInvalid first selection.") (exit)) (vlax-ename->vla-object ent2) ) (if (and ent1 ent2) (progn (setq pts '()) (setq i 0) (while (<= i (fix (vlax-curve-getEndParam ent1))) (setq ptv (vlax-curve-getPointAtParam ent1 i)) (setq ptc (vlax-curve-getClosestPointTo ent2 ptv)) (setq mid (midpt ptv ptc)) (setq pts (append pts (list mid))) (setq i (1+ i)) ) (setq i 0) (while (<= i (fix (vlax-curve-getEndParam ent2))) (setq ptv (vlax-curve-getPointAtParam ent2 i)) (setq ptc (vlax-curve-getClosestPointTo ent1 ptv)) (setq mid (midpt ptv ptc)) (setq pts (append pts (list mid))) (setq i (1+ i)) ) (setq polylst (sortpts pts)) (setq Flag (if (= (vla-get-Closed ent1) :vlax-true) 1 0)) ; Get closed status (entmake (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length pts)) (cons 70 flag) ) (mapcar '(lambda (p) (cons 10 p)) polylst) ) ) (princ "\nNew midpoint polyline created.") ) (princ "\nSelection error.") ) (princ) ) (defun c:CPA () (C:CLOSEPOLYAVG)) (defun midpt (p1 p2) (mapcar '(lambda (a b) (/ (+ a b) 2.0)) p1 p2) ) (defun sortpts (pointlist / pts-sort current next) (setq pts-sort (list (car pointlist))) ; Start with first point (setq pointlist (cdr pointlist)) ; Remove it from list as (while pointlist (setq current (last pts-sort)) ; Get last point in sorted (setq next (car (vl-sort pointlist (function (lambda (a b) (< (distance current a) (distance current b)) ) ) ) ) ) (setq pointlist (vl-remove next pointlist)) ; Remove selected point (setq pts-sort (append pts-sort (list next))) ; Add to sorted list ) pts-sort )
  3. I'm experiencing a performance issue when processing very large CSV files. My code works correctly, but when I work with large datasets, reading becomes extremely slow. I suspect the read-line method may be the main bottleneck. Does anyone have suggestions on how to optimize this operation? I've attached an example of the CSV I'm using for reference. The file has approximately 10,993 rows. Has anyone experienced a similar situation or have tips for improving performance when reading massive CSV files? I appreciate any help! ;; ===== IMPORTAÇÃO DE QUADRAS COM TEXTO CENTRALIZADO, ROTACIONADO E DESLOCADO ===== (defun c:arruamentos-ultra-turbo ( / delimitador patharquivo doc modelSpace linhas file linha coord_str lista_pontos endereco old_cmdecho old_highlight start_time end_time elapsed_time count-total count-valid count-poly debug-limit pares xy campos tipo titulo nome texto_pt texto_obj) (setq old_cmdecho (getvar "CMDECHO") old_highlight (getvar "HIGHLIGHT") start_time (getvar "MILLISECS") count-total 0 count-valid 0 count-poly 0) (setvar "CMDECHO" 0) (setvar "HIGHLIGHT" 0) (command "_.UNDO" "_Begin") (setq delimitador ";") (setq patharquivo (getfiled "Selecione .CSV" (getvar 'DWGPREFIX) "csv" 16)) (if patharquivo (progn (princ "\nLendo arquivo...") (setq file (open patharquivo "r") linhas '()) (while (setq linha (read-line file)) (if (and linha (/= linha "")) (setq linhas (cons linha linhas)) ) ) (close file) (setq linhas (cdr (reverse linhas))) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (setq modelSpace (vla-get-ModelSpace doc)) (dos_getprogress "FTTx - Importando Quadras" "Por favor, aguarde..." (length linhas)) (foreach linha linhas (setq count-total (1+ count-total)) (dos_getprogress -1) (setq campos (fttx:str->lst-rapido linha delimitador)) (if (>= (length campos) 7) (progn (setq coord_str (vl-string-subst "" "\"" (nth 0 campos))) (setq tipo (vl-string-trim " " (nth 4 campos))) (setq titulo (vl-string-trim " " (nth 5 campos))) (setq nome (vl-string-trim " " (nth 6 campos))) (setq endereco (vl-string-trim " " (strcat tipo " " titulo " " nome))) (if (and coord_str (wcmatch coord_str "MULTILINESTRING (*")) (progn (setq coord_str (vl-string-subst "" "MULTILINESTRING ((" coord_str)) (setq coord_str (vl-string-subst "" "))" coord_str)) (setq pares (fttx:str->lst-rapido coord_str ",") lista_pontos '()) (foreach par pares (setq xy (fttx:str->lst-rapido (vl-string-trim " " par) " ")) (if (= (length xy) 2) (setq lista_pontos (cons (list (read (car xy)) (read (cadr xy)) 0.0) lista_pontos)) ) ) (if (and lista_pontos (> (length lista_pontos) 1)) (progn (setq count-valid (1+ count-valid)) (setq lista_pontos (reverse lista_pontos)) (if (criar-polilinha-rapida lista_pontos modelSpace) (progn (setq count-poly (1+ count-poly)) (criar-texto-no-meio endereco lista_pontos modelSpace) ) ) ) ) ) ) ) ) ) (dos_getprogress t) (setq end_time (getvar "MILLISECS") elapsed_time (/ (- end_time start_time) 1000.0)) (princ (strcat "\nImportação finalizada." "\n - Linhas totais: " (itoa count-total) "\n - Coordenadas válidas: " (itoa count-valid) "\n - Polilinhas criadas: " (itoa count-poly) "\n - Tempo: " (rtos elapsed_time 2 2) "s")) ) (princ "\n⚠ Nenhum arquivo selecionado.") ) (command "_.UNDO" "_End") (setvar "CMDECHO" old_cmdecho) (setvar "HIGHLIGHT" old_highlight) (princ) ) (defun criar-polilinha-rapida (lista_pontos modelSpace / objArray n idx lista_pontosutm) (setq lista_pontosutm (mapcar '(lambda (p) (fttx:geo->ut p 6378160.0 298.25)) lista_pontos ) ) (setq n (* 2 (length lista_pontosutm))) (if (> n 0) (progn (setq objArray (vlax-make-safearray vlax-vbDouble (cons 0 (1- n))) idx 0) (foreach p lista_pontosutm (vlax-safearray-put-element objArray idx (car p)) (vlax-safearray-put-element objArray (1+ idx) (cadr p)) (setq idx (+ idx 2)) ) (vla-AddLightWeightPolyline modelSpace (vlax-make-variant objArray)) T ) nil ) ) (defun criar-texto-no-meio (conteudo pts modelSpace / pt1 pt2 mid ang offset_pt txtobj) ;; pegar primeiro e último ponto para orientação e centro (setq pt1 (fttx:geo->ut (car pts) 6378160.0 298.25)) (setq pt2 (fttx:geo->ut (last pts) 6378160.0 298.25)) (setq mid (list (/ (+ (car pt1) (car pt2)) 2.0) (/ (+ (cadr pt1) (cadr pt2)) 2.0) 0.0)) (setq ang (angle pt1 pt2)) ;; deslocamento de 1m perpendicular ao segmento (setq offset_pt (list (+ (car mid) (* 2.0 (sin ang))) (- (cadr mid) (* 2.0 (cos ang))) 0.0)) (setq txtobj (vla-AddText modelSpace conteudo (vlax-3d-point offset_pt) 1.5)) (vla-put-Rotation txtobj ang) (vla-put-Alignment txtobj acAlignmentMiddleCenter) (vla-put-TextAlignmentPoint txtobj (vlax-3d-point offset_pt)) txtobj ) (defun fttx:calcular-centroide (pts / x y n) (setq x 0 y 0 n 0) (foreach p pts (setq x (+ x (car p)) y (+ y (cadr p)) n (1+ n))) (if (> n 0) (list (/ x n) (/ y n) 0.0) '(0.0 0.0 0.0) ) ) (defun fttx:str->lst-rapido (str del / pos len result chunk) (if (and str del) (progn (setq len (1+ (strlen del))) (while (setq pos (vl-string-search del str)) (setq chunk (substr str 1 pos)) (if (> (strlen chunk) 0) (setq result (cons chunk result))) (setq str (substr str (+ pos len))) ) (if (> (strlen str) 0) (setq result (cons str result))) (reverse result) ) ) ) ourinhos.csv
  4. PGia

    Hybrid parallel

    I've attached a small example drawing. I've tried all the codes: @roy437, @Lee Mac, @mhupp and @SLW210 The SLW's code seems to return the same result as Lee Mac's. I've run each command twice, changing the selection order of the polylines, and saved the result in a single layer. As you can see, none of them return the same axis when the selection order is changed. Also, in some turns, there are significant deviations from the "real" axis. The problem is that my manual method also doesn't capture the real axis, although it's quite close, and in some turns, it also deviates slightly. My axis is also drawn (in the red rectangles) on the "myaxis" layer, and I've left the perpendiculars I used to calculate it in green. AxisExample.dwg
  5. Just a side note sort has some other funky quirks with "sorting" As shown in @BIGAL's example of (bubblesort a) were 127 is before 27 and 3 Even windows explorer does this also. I don't know what kinda of strings your working with but maybe consider using fixed numbering showing them in the correct order ("001" "001" "003" "027" "122" "54b" "A34") Tho if these are block names that is no good because 001 <> 1. Maybe convert your list into dotted pairs this would keep all unique values and a running count (defun C:foo ( / test lst item) (setq test '("1" "2" "3" "3" "1" "2" "2" "1" "3" "1" "3" "1")) (setq lst '()) ; initialize empty list (foreach str test (setq item (assoc str lst)) ; check if str is in lst (if item (setq lst (subst (cons str (+ (cdr item) 1)) item lst)) ; update count (setq lst (cons (cons str 1) lst)) ; add new string with count 1 ) ) (setq lst (vl-sort lst '(lambda (x y) (< (car x) (car y))))) ;sorts lst by car of dotted pair (princ "\nCounts:") (foreach itm lst (princ (strcat "\n" (car itm) ": " (itoa (cdr itm)))) ) (princ) )
  6. Thanks BIGAL: I overcame the problem by using VL-SORT-I: (setq lst '("2" "1" "3" "1")) (mapcar '(lambda (x) (nth x lst))(vl-sort-i lst '<)) the result is: ("1" "1" "2" "3") For completeness, I also refer to a post where I was looking for a way to arrange elements according to various criteria. HERE ... but the VL-SORT mentioned in this post was only to illustrate that GStarCAD sometimes behaves strangely, or even just differently from AutoCAD. Thank you anyway for your interest: it’s always great when experienced users take the time to understand other people's problems!
  7. You'll need to make it. C:\Users\Public\Documents\Autodesk\Inventor <version>\Design Data\XLS and modify the Threads.xls, you might need to also alter the Clearance.xls, be sure to Save the originals some where, I usually just Saves and add _Original to the name. It's been a while since I used Inventor, but pretty sure it's just the case of adding the new information, make sure they are saved to correct location and are correctly named Threads.xls and Clearance.xls, when you restart Inventor they should be there.
  8. To draw the 3D model from the upside-down Fig 15.47, start by identifying its basic shapes and overall structure. Sketch the largest shape first, adjust for the correct orientation, and use perspective lines to position the shapes in 3D space. Then add smaller details, edges, and curves, and finish by darkening final lines and adding shading for depth.
  9. nod684

    Place Device Based on Room Tag

    Programmatically I think it can be done via Dynamo. You need the list of the rooms and devices, get the room boundaries and room center point and place the designated device there using location nodes ... I haven't tried it though but i think it's possible.
  10. Forgot to add this idea, why not run the whole lot from a Macro in Excel ? I have make objects from Excel data in CAD, Excel does the same thing opens a link to the CAD. So please try this example it has the macro in it. Should draw a line, circle and pline. The critical portion of code in the macro is this could be just tested on its own to open Acad. Let me know if works with LT the get Application may be a problem. Set acadApp = GetObject(, "AutoCAD.Application") If acadApp Is Nothing Then Set acadApp = CreateObject("AutoCAD.Application") acadApp.Visible = True End If draw object xl acad.xlsmdraw object xl bricscad.xlsm
  11. Somewhere there is a comment in the Acad help about using sort and it removes duplicates. If you use different sort method you can get around it. I have some where Bubblesort method also. (setq a '("1" "2" "1" "3" "1" "4")) (acad_strlsort a) ("1" "1" "1" "2" "3" "4") (defun BubbleSort (lstItems / blnFlag item1 item2 lstItems2) (setq item1 (car lstItems)) (foreach item2 (cdr lstItems) (if (<= item1 item2) (setq lstItems2 (cons item1 lstItems2) item1 item2 ) (setq lstItems2 (cons item2 lstItems2) blnFlag T ) ) ) (if blnFlag (BubbleSort (reverse (cons item1 lstItems2))) (reverse (cons item1 lstItems2)) ) ) (setq a '("01" "122" "A34" "3" "1" "54b" "27")) (bubblesort a) ("01" "1" "122" "27" "3" "54b" "A34")
  12. Yesterday
  13. How do I put 7 1/2 " -12 thread on the inside of a 7.409 " hole ANSI Unified screw threads only go up to 4 inches
  14. pedro 47

    GRID VIEWPORT

    vaya esta excelente, el problema es que necesito cruces tambien, grilla con lineas y cruces
  15. SLW210

    Hybrid parallel

    Can you post a drawing with your manual center line? I always pick in the same direction, never noticed the line was different if selection reversed, I'll see if I can find out why. Your examples are much more extreme than anything I would have, could you say what those are and how they are generated?
  16. PGia

    Hybrid parallel

    Basically I try to draw a polyline equidistant to the reference lines. To do this, I draw perpendiculars from each point of each polyline to the closest segment of the other. Sometimes several points are concentrated in one of the polylines while in the other polyline there is only one long segment. In these cases, I draw all the perpendiculars that intersect that long segment, but for the last point, I already draw a line to the end of the long segment. When the perpendicular from a point goes to the next segment to which the previous ones were in the opposite polyline, then the perpendiculars must continue being made from the opposite polyline. I suppose it is a bit complicated to explain and understand, so I attach images of what I mean. My method isn't perfect, but it's pretty close. I thought there would be a better method, one that would be more geometrically rigorous than mine. As for Lee Mac's code, I must thank him for sharing his knowledge and his great code I've tested it, and the result is pretty close to what the true axis between the two polylines should be. But it still deviates in the pivot areas. Also, the result varies depending on the order in which the polylines are selected, and this isn't good. A robust method should produce the same result in both cases. My idea was that it should be possible to obtain an axis in which any perpendicular to it is equidistant from the reference polylines. But I'm starting to think this isn't so easy.
  17. mhupp

    Hybrid parallel

    I guess you could do like (setq i (+ i 0.01)) 16 vertex poly would then create a 1600 vertex poly And then run overkill on the created polyline to remove all collinear vertexes.
  18. mhupp

    Looped -Insert Command

    looks like your command outputs like Tot: 1 | x, y, z Tot: 2 | x, y, z Tot: 3 | x, y, z Another option if you just using that output for checking use the status line with modemacro tho it would only be the last count / point info ;;----------------------------------------------------------------------------;; ;; Insert Block with Tot: Count and X, Y, Z output into status bar (defun c:mbi ( / *error* nobi p doc) (vl-load-com) (vla-startundomark (setq doc (vla-get-activedocument (vlax-get-acad-object)))) (princ "\n Multi-Insert Block w.Total <!pp> ..") (command "DDINSERT" "\\") (setvar 'cmdecho 0) (setq nobi 1) (ccv nobi) (while T ;; insert loop of selected block (command "_.-INSERT" "" "_s" 1 "_r" 0 "\\") ;; "_y") ; (setq nobi (+1 nobi) (ccv nobi) ;passes nobi to ccv as i ) (vla-endundomark doc) (setvar 'MODEMACRO "") (setvar 'cmdecho 1) (princ) ) (defun ccv (i / p str) (setq p (getvar 'lastpoint)) (setq str (strcat "Tot: " (rtos i) " | " (rtos (car p) 2 4) "," (rtos (cadr p) 2 4) "," (rtos (caddr p) 2 4))) (SETVAR 'MODEMACRO str) )
  19. Saw this when searching for something else. can be modified for blocks attributes.
  20. Steven P

    Hybrid parallel

    I guess the solution is to programme how you currently do this - what is your manual method? As for a solution, haven't looked how SLW210 does his but might expand MHUPP to use both polylines and find the mid points using all verticies.
  21. SLW210

    Hybrid parallel

    You can try this...I am not sure how accurate it will be for you, but 100-500 sample size looked pretty good on your drawing, you can change the default, but I kept it at 50 for myself. ;;; Draw a polyline centered between two selected polylines (can be dissimilar/irregular). ;;; ;;; https://www.cadtutor.net/forum/topic/98778-hybrid-parallel/#findComment-676800 ;;; ;;; By SLW210 (a.k.a. Steve Wilson) ;;; (defun c:DrawCl (/ pl1 pl2 num-pts len1 n dist step pt1 pt2 midpt pts) (vl-load-com) ;; Select first polyline (setq pl1 (car (entsel "\nSelect first polyline: "))) (if (not (and pl1 (= (cdr (assoc 0 (entget pl1))) "LWPOLYLINE"))) (progn (princ "\nInvalid first selection.") (exit)) ) ;; Select second polyline (setq pl2 (car (entsel "\nSelect second polyline: "))) (if (not (and pl2 (= (cdr (assoc 0 (entget pl2))) "LWPOLYLINE"))) (progn (princ "\nInvalid second selection.") (exit)) ) ;; Set number of sample points to use (it uses last number entered, default is 50) (if (not *CL_lastNumPts*) (setq *CL_lastNumPts* 50)) (setq num-pts (getint (strcat "\nEnter number of sample points <" (itoa *CL_lastNumPts*) ">: ") ) ) (if (null num-pts) (setq num-pts *CL_lastNumPts*)) (setq *CL_lastNumPts* num-pts) ;; Calculate (setq len1 (vlax-curve-getDistAtParam pl1 (vlax-curve-getEndParam pl1))) (setq step (/ len1 num-pts)) (setq dist 0.0 pts '() ) ;; Midpoint list (repeat (1+ num-pts) (setq pt1 (vlax-curve-getPointAtDist pl1 dist)) (setq pt2 (vlax-curve-getClosestPointTo pl2 pt1)) (if (and pt1 pt2) (setq pts (cons (mapcar '(lambda (a b) (/ (+ a b) 2.0)) pt1 pt2) pts)) ) (setq dist (+ dist step)) ) ;; Create polyline (if pts (progn (setq pts (reverse pts)) (entmake (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 (length pts)) (cons 70 0) ) (mapcar '(lambda (p) (cons 10 p)) pts) ) ) (princ "\nCenterline drawn accurately between polylines.") ) (princ "\nNo points generated — check polylines.") ) (princ) ) (princ "\nType DrawCl to draw a centerline between two polylines.") (princ) That said, I just tried Lee Mac's cPoly in mhupp's last link posted, seems to be similar results to mine if you adjust the sample points. I haven't checked the others yet, I'll run through them if I get time. I originally made mine with the command function, then changed it to entmake, pretty sure the accuracy is the same, it just had a lot of "Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:" in the commandline for each sample. P.S. Mine should take into account reversed polylines. At the same sample size, mine and Lee Mac's seem to be exactly the same on your drawing. I still have to do on mine, set a layer and linetype option in the code.
  22. ScottMC

    Looped -Insert Command

    Thanks Lee.. you continue to inspire many. (defun c:mbi ( / *error* nobi p) (princ "\n Multi-Insert Block w.Total <!pp> ..") (defun *error* ( msg ) (setvar 'cmdecho 0) ;; 5.28.24 (vla-endundomark (vla-get-activedocument (vlax-get-acad-object))) (if msg (prompt (strcat "\n" msg))) (setvar 'cmdecho 1) (princ) ) (defun ccv ( / p) (setq p (getvar 'lastpoint)) (princ (setq pp ;; make/prints coords & paste usable (strcat " | " (rtos (car p) 2 4) "," ;; 'p' -- vertex from getpoint,... (rtos (cadr p) 2 4) "," (rtos (caddr p) 2 4) ) ) ) ) (command "DDINSERT" "\\") (setvar 'cmdecho 0) (setq nobi 1) (princ (strcat "\n Tot: " (rtos nobi))) (ccv) ;; coords (while T ;; insert loop of selected block (setq nobi (1+ nobi)) (princ (strcat "\n Tot: " (rtos nobi))) (command "_.-INSERT" "" "_s" 1 "_r" 0 "\\") ;; "_y") ; (ccv) ;; coords ) (*error* nil) (princ) )
  23. My version of GStarCAD is 2023 Italian Even my social life is not the most active... but in 30 years of CAD I have reached a good level of basic Lisp... but nothing more complicated GSTARCAD is excellent software ... but sometimes it has small bugs that have never been fixed: (vl-sort '("2" "1" "3" "1") '<) In Autocad: ("1" "1" "2" "3") in GStarCAD: ("1" "2" "3") Duplicate elements are removed!
  24. After a quick look on GstarCAD, DBX works, though some commands may be different from AutoCAD's. If time allows I might make an attempt to narrow down some options.
  25. in essence I took out the dbx stuf like : (defun dbx_ver ( / v) (strcat "objectdbx.axdbdocument" (if (< (setq v (atoi (getvar 'acadver))) 16) "" (strcat "." (itoa v))))) (setq acApp (vlax-get-acad-object) acDoc (vla-get-ActiveDocument acApp)) (setq dbx (vl-catch-all-apply 'vla-getinterfaceobject (list acApp (dbx_ver)))) (vla-open dbx dwg) ; put all block objects in a list (setq object-list (ss->ol ss)) ; put list with objects in a safe array (setq object-safe-array (vlax-make-safearray vlax-vbobject (cons 0 (1- (length object-list))))) (vl-catch-all-apply 'vlax-safearray-fill (list object-safe-array object-list)) ; copy objects to dbx-drawing (vla-CopyObjects acDoc object-safe-array (vla-get-ModelSpace dbx)) (vl-catch-all-apply 'vla-saveas (list dbx dwg)) (vl-catch-all-apply 'vlax-release-object (list dbx)) (setq object-list nil object-safe-array nil) In lasted version I used : (defun Get_EX_Blocknames (dbDoc / fn l) (if (and (eq (type dbDoc) 'STR)(setq fn (findfile dbDoc)) (setq doc (vla-open (vla-get-documents (vlax-get-acad-object)) fn))) (progn (setq l (GetDocBlockNames doc))(vla-close doc)(vlax-release-object doc))) l) ;;; test (setq lst (GetDocBlockNames (vla-get-ActiveDocument (vlax-get-acad-object)))) (defun GetDocBlockNames ( d / b n l) (vlax-for b (vla-get-blocks d) (if (and (= :vlax-false (vla-get-isxref b)) (= :vlax-false (vla-get-islayout b)) (not (vl-string-search "*" (setq n (vla-get-name b)))))(setq l (cons n l)))) l) instead of using (vla-open dbx dwg) I now used (vla-open (vla-get-documents (vlax-get-acad-object)) fn) using vla-open means you best only use vla- commands and never ever use vla-activate until the very last end because at that point lisp focus will end there and any code left with it. Lisp can only run in one document at the time , but when using vla- commands only it is possible to open and close other drawing and stil maintain lisp focus. Maybe not beginners stuf but me too only got where I am by beg steal & borrow code from others , change things an see what happens. This all costs time but having a wife with her own hobbies or not having a social life all helps
  26. SLW210

    Excel link - Sanity check please

    That's not what steven-g used, plus Autodesk shut them down. From Danielm103's link. They suggest BricsCAD now.
  27. What version of GstarCAD are you using? Enhanced API in GstarCAD 2024 I would think anything that runs in AutoCAD LT would work, if I have time and @rlx doesn't get back, I'll try to look at them (I am curious about this). If you could carefully list out what happened with each code in AutoCAD and GstarCAD, it would help.
  1. Load more activity
×
×
  • Create New...