Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/03/2025 in all areas

  1. Are you able to post a copy of the LISP so we can see what is happening? Sounds like your (command method is referring to the source file and the (vla- method is referring to your working file
    3 points
  2. I think Steven is right , this is about redefining or not. When you insert a block without path , AutoCad uses the block definition allready present in active drawing. If you put a path to it , AutoCad will overwrite current block definition with the one on file. So , if you insert block for the first time , then edit it and after that insert the one from file , your edited definition will be overwritten again. Standard / classic / basic AutoCad behaviour.
    2 points
  3. I agree with what you said. (setq theblock (vla-InsertBlock mspace ip item xscale yscale zscale rot)) Editing the code like this fixed it. Thanks .
    1 point
  4. O mine is the other way around in that the viewport has to be existing in paperspace already with the sacle you want. ;;----------------------------------------------------------------------------;; ;; Creates Viewport outline and moves it to Model space (defun C:VP2M (/ SS vp elist MiscOn cen c40 c41 LL UR) (if (setq SS (ssget "_X" (list '(0 . "viewport") (cons 410 (getvar 'ctab))))) (foreach vp (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (setq elist (entget vp)) (if (> (cdr (assoc '69 elist)) 1) ; skip display viewport (progn (if (= (cdr (assoc '68 elist)) 0) ; is viewport active? (progn (setq MiscOn 'NO) (vl-cmdf "._Mview" "_on" "_si" vp) ; activate viewport ) (setq MiscOn 'YES) ) (setq cen (cdr (assoc '10 elist)) c40 (cdr (assoc '40 elist)) ;length c41 (cdr (assoc '41 elist)) ;width LL (list (- (car cen) (/ c40 2)) (- (cadr cen) (/ c41 2))) UR (list (+ (car cen) (/ c40 2)) (+ (cadr cen) (/ c41 2))) ) (vl-cmdf "_.Pspace") (vl-cmdf "_.Rectangle" LL UR) (vl-cmdf "_.Chspace" "_Last" "") (vl-cmdf "_.Pspace") (if (eq MiscOn 'NO) (vl-cmdf "_.Mview" "_off" "_si" vp) ; deactivate viewport ) ) ) ) ) ;(setvar 'Tilemode 1) ;switch to model space (princ) )
    1 point
  5. Like @mhupp I have a couple of make layouts I tend to use this front end which matches a user's title blocks. You can make multiple in one go using 2 different methods or pick a central point. It is two separate functions as you can check the rectangs 1st then make the layouts. Happy to discuss further.
    1 point
  6. After many months of avoiding this issue when I switched offices. I found out this happens when linetypes are created with .shp files required. If you have an issue where the linetyepes show incorrectly please just do the following to fix. 1. Type "OPTIONS" 2. Go to FILES tab 3. Support File folder, and navigate to the file that holds your fonts files and move it to the top of the list. 4. Finally, close cad and reopen. The hierarchy of the support files a crucial to what it loads and displays in cad. It will ignore the file needed if it is not prioritized in the support file folder correctly. You are welcome
    1 point
  7. Like @Lee Mac a simple change layouts script file. (command "Script" "myviews") (setvar 'ctab "D01") zoom e delay 500 (setvar 'ctab "D02") zoom e delay 500 (alert "All done")
    1 point
  8. Try the DELAY command - the argument represents a time in millisecs.
    1 point
×
×
  • Create New...