Author Topic: HELP ME WITH LAYOUT  (Read 2578 times)

0 Members and 1 Guest are viewing this topic.

vnanhvu

  • Guest
HELP ME WITH LAYOUT
« on: August 05, 2011, 05:17:53 AM »
   I cant display frame viewport layout with this drawing. Can you help me? Thanks for all.

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: HELP ME WITH LAYOUT
« Reply #1 on: August 05, 2011, 05:46:16 AM »
Here it is... I turned on from layer drop down menu "freeze or thaw in current viewport" Layer "A-_ANOTVPRT_P-" and viewports reappeared... You may also consider that that layer is not plottable - use command "layer" and you'll see that that option is marked red - unplottable...

M.R.
Hope this helps...

Firstly I thought this was the problem, but I was wrong... Anyway, someone could do this so consider it also :
Code: [Select]
(defun c:vpsvisibility ( / adoc pspcoll psplst ch)
(vl-load-com)
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(setq pspcoll (vla-get-paperspace adoc))
(vlax-for ent pspcoll
(setq psplst (cons (vl-catch-all-apply 'vla-get-objectname (list ent)) psplst))
)
(setq psplst (reverse psplst))
(princ psplst)
(prompt "\nPress ENTER to continue")
(textscr)
(command pause)
(initget 1 "Yes No")
(setq ch (getkword "\nDo you want to turn on/off visibility <Yes/No> : "))
(vlax-for ent pspcoll
(if (= ch "Yes")
(vla-put-visible ent :vlax-true)
(vla-put-visible ent :vlax-false)
)
)
(princ)
)
« Last Edit: August 05, 2011, 06:10:38 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

vnanhvu

  • Guest
Re: HELP ME WITH LAYOUT
« Reply #2 on: August 05, 2011, 08:23:39 AM »
   Thank you very much :lmao:

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Re: HELP ME WITH LAYOUT
« Reply #3 on: August 05, 2011, 05:28:55 PM »
Code: [Select]
(defun c:VP-on-off (/ ss sset v)
  ;; == Tharwat 06. 08. 2011 == ;;
  (vl-load-com)
  (if (eq (vla-get-activespace
            (vla-get-activedocument (vlax-get-acad-object))
          )
          0
      )
    (progn
      (setq
        ss (ssget "_x"
                  (list '(0 . "VIEWPORT") (cons 410 (getvar 'ctab)))
           )
      )
      (while
        (setq sset (ssname ss 0))
         (cond
           ((eq (vla-get-visible (setq v (vlax-ename->vla-object sset)))
                :vlax-false
            )
            (vla-put-visible v :vlax-true)
           )
           ((eq (vla-get-visible (setq v (vlax-ename->vla-object sset)))
                :vlax-true
            )
            (vla-put-visible v :vlax-false)
           )
         )
         (ssdel sset ss)
      )
    )
    (print "\n ** Command not allowed in Model Space ** ")
  )
  (princ)
)

Tharwat

ronjonp

  • Needs a day job
  • Posts: 7526
Re: HELP ME WITH LAYOUT
« Reply #4 on: August 05, 2011, 05:49:46 PM »
FWIW ... here's a cool little trick for a toggle:

(defun c:vp-on-off (/ o ss sset v)
  ;; == Tharwat 06. 08. 2011 == ;;
  (vl-load-com)
  (if (zerop (vla-get-activespace (vla-get-activedocument (vlax-get-acad-object))) 0)
    (progn (setq ss (ssget "_x" (list '(0 . "VIEWPORT") (cons 410 (getvar 'ctab)))))
      (while (setq sset (ssname ss 0))
       (setq o (vlax-ename->vla-object sset))
        (vlax-put o 'visible (boole 8 0 (vlax-get o)))

        (ssdel sset ss)
      )
    )
    (print "\n ** Command not allowed in Model Space ** ")
  )
  (princ)
)
« Last Edit: August 05, 2011, 05:54:51 PM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: HELP ME WITH LAYOUT
« Reply #5 on: August 05, 2011, 08:20:21 PM »
Or perhaps just:

Code: [Select]
(vlax-put <object> <property> (~ (vlax-get <object> <property>)))
 :-)

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Re: HELP ME WITH LAYOUT
« Reply #6 on: August 06, 2011, 01:40:25 AM »
Thanks ron and Lee .

Very nice alternative codes .

I feel hard to get the boole and bitwise very well  .

Regards.


alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: HELP ME WITH LAYOUT
« Reply #7 on: August 06, 2011, 01:51:53 AM »
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox


Jeff H

  • Needs a day job
  • Posts: 6144
Re: HELP ME WITH LAYOUT
« Reply #9 on: August 06, 2011, 01:59:08 AM »
I feel hard to get the boole and bitwise very well 
Had the same problem I would get all exicted about using booles and bitwise's in programming
but just take a deep breath and relax that might help or imagine your grandma naked

ronjonp

  • Needs a day job
  • Posts: 7526
Re: HELP ME WITH LAYOUT
« Reply #10 on: August 06, 2011, 09:26:39 AM »
Or perhaps just:

Code: [Select]
(vlax-put <object> <property> (~ (vlax-get <object> <property>)))
 :-)

Cool  :-)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC