Lee mac viewport outline lisp modification

Lee mac viewport outline lisp modification

matanT5LSH
Advocate Advocate
778 Views
5 Replies
Message 1 of 6

Lee mac viewport outline lisp modification

matanT5LSH
Advocate
Advocate

Hello, The lisp attached. It should mark the viewports zones into the model space. I am using the VPOA command and unfortunately the offset isnt working (I set it in my code to "5") and the layer creation isnt working as well, the lisp creates the polylines into the current layer. Please help me figure it out and fix it. I will note that Im not familiar with LISPs. thank you!

0 Likes
Accepted solutions (3)
779 Views
5 Replies
Replies (5)
Message 2 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

On the Layer question, I see this line in the Parameters section:

   ;(008 . "VPOutline") ;; Layer (automatically created if not present in drawing)

The semicolon at the front "comments out" that line so it is not read by the routine.  Does it do what you want if you remove the semicolon?

On the offset question, the offset distance is in paper space units, not model space.  Is your setting too big for that?  What is your drawing unit?  Do you get any messages [there are some built in for that kind of situation]?

Kent Cooper, AIA
0 Likes
Message 3 of 6

matanT5LSH
Advocate
Advocate

Hey! thank you

I remove the semicolon, now the code is exactly like the file attached, and its not working. 

Regard the offset, should I keep the "off" text there? can you show me an example of offset of 5? plus, what setting should I sort out? I didnt get any message.




0 Likes
Message 4 of 6

Moshe-A
Mentor
Mentor
Accepted solution

@matanT5LSH  hi,

 

how do you do?!

 

it is very rarely you see Mr Lee MAC here

here is a solution

in lisp file, find the line (here it is numbered 11) you see off 0.0 ? change 0.0 to 5.0

 

make sure you are running VPOA from model space 😀

 

enjoy

Moshe

 

 

(defun vpo:main ( vpt / cen dpr ent lst ltp ocs ofe off tmp vpe )

    (setq

;;----------------------------------------------------------------------;;
;;                          Program Parameters                          ;;
;;----------------------------------------------------------------------;;

        ;; Optional Interior Offset
        ;; Set this parameter to nil or 0.0 for no offset
        off 0.0

        ;; Default Polyline Properties
        ;; Omitted properties will use current settings when the program is run
        dpr
       '(
            (006 . "BYLAYER")   ;; Linetype (must be loaded)
           ;(008 . "VPOutline") ;; Layer (automatically created if not present in drawing)
            (039 . 0.0)         ;; Thickness
            (048 . 1.0)         ;; Linetype Scale
            (062 . 256)         ;; Colour (0 = ByBlock, 256 = ByLayer)
            (370 . -1)          ;; Lineweight (-1 = ByLayer, -2 = ByBlock, -3 = Default, 0.3 = 30 etc.)
        )

 

 

 

 

0 Likes
Message 5 of 6

matanT5LSH
Advocate
Advocate

Dear Moshe!

works perfectly

Do you know about the layer issue as well?

0 Likes
Message 6 of 6

Moshe-A
Mentor
Mentor
Accepted solution

As for the layer, @Kent1Cooper is absolutely correct, make sure to remove only the left semicolon (leave the right intact).

 

Moshe

 

0 Likes