Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/02/2022 in all areas

  1. http://lee-mac.com/debugvlide.html
    1 point
  2. Oh it's new to me. thanks, I run away to (vl-load-com). Because it is difficult for me to find and think case of multiple (3 . ~ I tested vlax-get-property obj 'textstring by 10000 character mtext. get the textstring was fine. but There was an error in vlax-dump-object i don't know why (defun c:pru2 ( / e obj line ) (setq e (car (entsel "\nSelection text: "))) (setq obj (vlax-ename->vla-object e)) (setq line (LM:Unformat (vlax-get-property obj 'textstring) nil)) (princ line) (princ) );fin defun (vl-load-com) ;;-------------------=={ UnFormat String }==------------------;; ;; ;; ;; Returns a string with all MText formatting codes removed. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; str - String to Process ;; ;; mtx - MText Flag (T if string is for use in MText) ;; ;;------------------------------------------------------------;; ;; Returns: String with formatting codes removed ;; ;;------------------------------------------------------------;; (defun LM:UnFormat ( str mtx / _replace rx ) (defun _replace ( new old str ) (vlax-put-property rx 'pattern old) (vlax-invoke rx 'replace str new) ) (if (setq rx (vlax-get-or-create-object "VBScript.RegExp")) (progn (setq str (vl-catch-all-apply (function (lambda ( ) (vlax-put-property rx 'global actrue) (vlax-put-property rx 'multiline actrue) (vlax-put-property rx 'ignorecase acfalse) (foreach pair '( ("\032" . "\\\\\\\\") (" " . "\\\\P|\\n|\\t") ("$1" . "\\\\(\\\\[ACcFfHLlOopQTW])|\\\\[ACcFfHLlOopQTW][^\\\\;]*;|\\\\[ACcFfHLlOopQTW]") ("$1$2/$3" . "([^\\\\])\\\\S([^;]*)[/#\\^]([^;]*);") ("$1$2" . "\\\\(\\\\S)|[\\\\](})|}") ("$1" . "[\\\\]({)|{") ) (setq str (_replace (car pair) (cdr pair) str)) ) (if mtx (_replace "\\\\" "\032" (_replace "\\$1$2$3" "(\\\\[ACcFfHLlOoPpQSTW])|({)|(})" str)) (_replace "\\" "\032" str) ) ) ) ) ) (vlax-release-object rx) (if (null (vl-catch-all-error-p str)) str ) ) ) )
    1 point
  3. I opened the file and exploded some of the blocks. In the image on the left, the grey parts are the blocks that I exploded. Then I ran Flatshot and got the image on the right. As I was exploding blocks I found that some blocks are inserted twice, so there are duplicates that are overlapping. The model needs to be cleaned, to remove all the duplicate overlapping blocks. As for exploding blocks, I only had to explode some of them to get Flatshot to work, so I'm not sure what the problem is. Maybe there are some bad blocks? A lot of the blocks that I exploded were mirrored. Maybe that's an issue? Maybe copy and rotate would be better than mirroring? You will have to experiment to find out what the root cause of the problem is. In the meantime, exploding the blocks seems to work.
    1 point
  4. Try this ... does not check for locked layers. (defun c:foo (/ a i o s) (if (setq s (ssget "_X" '((0 . "TEXT") (1 . "* .#,* .##,* .###")))) (foreach e (mapcar 'cadr (ssnamex s)) (setq a (vla-get-textstring (setq o (vlax-ename->vla-object e)))) (setq i (vl-string-position 32 a 0 t)) (vla-put-textstring o (substr a 1 i)) ) ) (princ) )
    1 point
  5. You need to look at Lee-mac dynamic block properties lisp to get properties of a block, as a dynamic block is *U???? by name. You need to use ssget with the *U* blockname, you can then look at the selection set and find the common block which has also a "effective name", then dig deeper getting the properties you want.
    0 points
×
×
  • Create New...