Link from Paper space to model space

Link from Paper space to model space

pathA99VU
Participant Participant
2,216 Views
11 Replies
Message 1 of 12

Link from Paper space to model space

pathA99VU
Participant
Participant

We had been placing our detail call outs in paper space in our drawings. This made it easy to use a field to link the text of the detail call out to show the detail/viewport scale. Well now all those detail call outs are being moved to model space. (per company standards) So, Is there a way to still maintain that link? Some workaround, coding, etc.

0 Likes
Accepted solutions (1)
2,217 Views
11 Replies
Replies (11)
Message 2 of 12

CodeDing
Advisor
Advisor

@pathA99VU ,

 

The ONLY reason I can think somebody would move a detail callout with a scale to Model Space is if they were going to Also PLOT from Model Space... If you are still plotting from a Layout, then this move makes no sense to me.

 

I'm sure there is SOME way to code it.. but I do not feel that it would save you much, if any, steps because you would still need to navigate to your tab and select your viewport... I also do not believe there would be a way to do this with fields anymore. Not that come to mind anyways.

 

Honestly might be easier to say your piece with CAD manager, and after about a week or two of people realizing that this is an illogical move, it will just get moved back to ps.

 

Just my thoughts.

Best,

~DD

0 Likes
Message 3 of 12

pathA99VU
Participant
Participant

Yes, it makes no sense! I am fighting it all the way. (looks to be a losing battle tho)

 

0 Likes
Message 4 of 12

CodeDing
Advisor
Advisor

@pathA99VU ,

 

1) Are your viewports rectangular only?

2) Will there only be ONE detail callout visible in the viewport?

3) Is the scaling either an Attribute or Visibility of the block?

 

If you answer Yes, Yes and Yes... Then we COULD create a command which the user would select the viewport and it would check model space at the extents of the viewport for your block, then if found make any necessary changes to the block.

 

That would be the easiest approach for you.

BUT I WANT TO BE CLEAR that based on the limited information you have provided, this move still makes no sense to me haha.

 

Best,

~DD

0 Likes
Message 5 of 12

pathA99VU
Participant
Participant

1.yes

2.yes

3.yes, attribute

0 Likes
Message 6 of 12

CodeDing
Advisor
Advisor

Can you post a dwg with your callout block please? So we can get the name / attribute info.

0 Likes
Message 7 of 12

pathA99VU
Participant
Participant

dwg attached

0 Likes
Message 8 of 12

maratovich
Advisor
Advisor

What's the end result?

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 9 of 12

CodeDing
Advisor
Advisor
Accepted solution

@pathA99VU ,

 

Here's my take. Let me know if that works.

 

(defun c:VDS ( / ent eng scl hwd hht msd msX msY pLL pUR str ss)
  ;Viewport Detail Scale
  (if (and (setq ent (car (entsel "\nSelect Viewport: ")))
           (setq eng (entget ent '("ACAD")))
           (eq "VIEWPORT" (cdr (assoc 0 eng)))
           (setq scl (getpropertyvalue ent "CustomScale"))
           (setq hwd (* (/ 1 scl) (* 0.5 (cdr (assoc 40 eng)))))
           (setq hht (* (/ 1 scl) (* 0.5 (cdr (assoc 41 eng)))))
           (setq msd (cdadr (assoc -3 eng)))
           (setq msX (cdar (cddr (member (assoc 1040 msd) msd))))
           (setq msY (cdar (cdddr (member (assoc 1040 msd) msd))))
           (setq pLL (list (- msX hwd) (- msY hht)))
           (setq pUR (list (+ msX hwd) (+ msY hht)))
           (setq str (getpropertyvalue ent "AnnotationScaleName"))
           (progn (command "_.MSPACE") (setvar 'CVPORT (cdr (assoc 69 eng))))
           (setq ss (ssget "_W" pLL pUR '((0 . "INSERT") (2 . "label_e1"))))
      );and
    (progn
      (setpropertyvalue (ssname ss 0) "SCALE" str)
      (prompt "\nComplete.")
    );progn
  ;else
    (prompt "\nNo action performed. Bad viewport or missing entity.")
  );if
  (command "_.PSPACE")
  (princ)
);defun

 

Best,

~DD

0 Likes
Message 10 of 12

pathA99VU
Participant
Participant

Thanks DD! I owe ya a beer!

0 Likes
Message 11 of 12

Anonymous
Not applicable

WARNING!

This message had a link to:

https://www.kdmsoft.net/

 

I clicked on this link and a LARGE RED X was displayed along with a message from my NortonLifeLock Safe Web.

Threat Report

This is a known dangerous web page. It is highly recommended that you do NOT visit this page

 

0 Likes
Message 12 of 12

maratovich
Advisor
Advisor

NO VIRUSES!
Norton is the weakest antivirus.
It does not have an algorithm for detecting viruses.
White and black list only.
Any site or file Norton automatically detects a virus.
This is verified. And the Norton developers confirmed it to me.
You can send a letter to Norton and they will say everything is clean.
The solution is simple - add a file or website to the white list of this antivirus.

 

https://www.virustotal.com 

 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes