#SSNAME
make a list of nested blocks coordinates
Hello every one kindly I've a question I've made a code to get the coordinate of the nested blocks and make a point in the nested coordinate it already gets the nested blocks coordinates but also it makes additional points in wrong coordinates kindly see the DWG and the lisp code.. (defun c:GETH20 ( / ss i ent pts ) (vl-load-com) (if (setq ss (ssget '((0 . "INSERT")))) (progn (setq pts '()) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i)))) (setq pts (append pts (FW:FindNestedBlock ent "H20 SECTION" '((1 0 0) (0 1 0) (0 0 1)) ; Identity matrix '(0 0 0) ; Base offset ) ) ) ) ;; Draw points + print coordinates (foreach p pts (entmakex (list '(0 . "POINT") (cons 10 p))) (prompt (strcat "\nH20 at: " (rtos (car p) 2 2) ", " (rtos (cadr p) 2 2) ", " (rtos (caddr p) 2 2) ) ) ) ) ) (princ) ) ;;; ============================================================ ;;; Recursive search for nested block ;;; ============================================================ (defun FW:FindNestedBlock (ent target mat off / enx blk rg newMat newOff blkdef res) (setq enx (entget ent) blk (cdr (assoc 2 enx)) rg (FW:RefGeom ent) newMat (FW:MatMul mat (car rg)) newOff (mapcar '+ (FW:MatVec mat (cadr rg)) off) res '() ) ;; Target block found → real WCS point (if (= (strcase blk) (strcase target)) (setq res (list newOff)) ) ;; Go inside block definition (if (setq blkdef (tblobjname "BLOCK" blk)) (while (setq blkdef (entnext blkdef)) (if (= "INSERT" (cdr (assoc 0 (entget blkdef)))) (setq res (append res (FW:FindNestedBlock blkdef target newMat newOff) ) ) ) ) ) res ) ;;; ============================================================ ;;; RefGeom - rotation, scale, insertion point ;;; ============================================================ (defun FW:RefGeom (ent / enx ang sx sy sz ocs mat ip) (setq enx (entget ent) ang (cdr (assoc 50 enx)) sx (cdr (assoc 41 enx)) sy (cdr (assoc 42 enx)) sz (cdr (assoc 43 enx)) ocs (cdr (assoc 210 enx)) ) ;; Rotation + scale matrix (setq mat (FW:MatMul (list (list (cos ang) (- (sin ang)) 0) (list (sin ang) (cos ang) 0) '(0 0 1) ) (list (list sx 0 0) (list 0 sy 0) (list 0 0 sz) ) ) ) ;; Insertion point in WCS (setq ip (trans (cdr (assoc 10 enx)) ocs 0) ) (list mat ip) ) ;;; ============================================================ ;;; Matrix helpers ;;; ============================================================ (defun FW:MatVec (m v) (mapcar '(lambda (r) (apply '+ (mapcar '* r v))) m ) ) (defun FW:MatMul (a b) (mapcar '(lambda (r) (mapcar '(lambda (c) (apply '+ (mapcar '* r c))) (apply 'mapcar (cons 'list b)) ) ) a ) ) (princ)
forums.autodesk.com
January 16, 2026 at 2:55 PM
Text insertion point
Minor setback on this Swap and rotate program can't seem to get the proper coord's for insertion point of my text. I'm sure it's group code 10, my text is justified at MC. (defun C:SR (/ eset en1 enlist1 en1coord en2 enlist2 en2coord inspt txt1 txt2) (setq oldosnap (getvar "OSMODE")) (setvar "OSMODE" 0) (command "OSNAP" "NONE") (princ "\n ") (princ "\nSelect your two text entities: ") (setq eset (ssget)) (if (and (/= eset nil)(= (sslength eset) 2)) (progn (setq en1(ssname eset 0)) (setq enlist1(entget en1)) (setq en1coord (cdr (assoc 10 enlist1))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq en2(ssname eset 1)) (setq enlist2(entget en2)) (setq en2coord (cdr (assoc 10 enlist2))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq inspt (polar en1coord (angle en1coord en2coord) (/ (distance en1coord en2coord) 2))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq txt1(cdr (assoc 1 enlist1))) (setq txt2(cdr (assoc 1 enlist2))) (setq enlist1 (subst (cons 1 txt2) (assoc 1 enlist1) enlist1)) (entmod enlist1) (setq enlist2 (subst (cons 1 txt1) (assoc 1 enlist2) enlist2)) (entmod enlist2) (entmod eset2) (command "Rotate" "p" "" inspt "180") );progn (princ "\nNothing Selected") );if (setvar "OSMODE" oldosnap) (princ) )
forums.autodesk.com
January 15, 2026 at 6:52 PM
Unlocking the Future of Maritime Technology at Marintec Innovation Conference 2024#China#Shanghai#Marintec_Innovation#Maritime_Technology#SSNAME
Unlocking the Future of Maritime Technology at Marintec Innovation Conference 2024
Experience innovation in maritime technology with the Marintec Innovation Conference 2024, focusing on alternative energy and sustainable practices.
third-news.com
November 26, 2024 at 6:05 AM
That should be a 1-way bridge #ExitOnly RT @ethomson: Git to Visual Source Safe bridging. http://stackoverflow.com/q/27060121/729881 Now I've seen everything.
Is git rebase wrong / right in this case (syncing git master with a SourceSafe Repository)
I am working on some git-VSS interop and the way I have approached syncing my git master with SS is git checkout vss_branch ss get . -W -R -Q -Y$SSNAME git checkout master git rebase vss_branch ma...
stackoverflow.com
November 15, 2024 at 4:29 PM