Jump to content

New ucs using entmake


Hmm..

Recommended Posts

Can anyone tell me what is wrong with this code?

 

 
(entmake '((0 . "UCS") (2 . "q1") (70 . 0)
  (10 611.533 -2957.24 0.0)
  (11 1.0 0.0 0.0)
  (12 1.0 0.0 0.0)
  (79 . 0) (146 . 0.0)))

 

New ucs isn't made..

Link to comment
Share on other sites

(entmake '((0 . "UCS")
    (100 . "AcDbSymbolTableRecord")
    (100 . "AcDbUCSTableRecord")
    (2 . "q1")
    (70 . 0)
    (10 611.533 -2957.24 0.0)
    (11 1.0 0.0 0.0)
    (12 0.0 1.0 0.0)
    (79 . 0)
    (146 . 0.0)
   )
)

Link to comment
Share on other sites

Do you know also what must be chaneged in following list to make a viewport using entmake?

 

 
((-1 . <Entity name: 7efb6f18>) (0 . "VIEWPORT") (330 . <Entity 
name: 7efb6db0>) (5 . "6A3") (100 . "AcDbEntity") (67 . 1) (410 . "1_1_1") (8 . 
"0") (100 . "AcDbViewport") (10 695.72 252.947 0.0) (40 . 159.041) (41 . 
93.7076) (68 . 2) (69 . 3) (12 -3109.29 -131.475 0.0) (13 0.0 0.0 0.0) (14 0.5 
0.5 0.0) (15 0.5 0.5 0.0) (16 -7309.86 8820.54 12455.1) (17 446.166 -4419.46 
-460.403) (42 . 50.0) (43 . 0.0) (44 . 0.0) (45 . 15185.6) (50 . 0.0) (51 . 
1.24127e-016) (72 . 1000) (90 . 557152) (281 . 0) (71 . 1) (74 . 0) (110 3874.3 
4174.08 0.0) (111 -1.0 1.22465e-016 0.0) (112 -1.22465e-016 -1.0 0.0) (79 . 0) 
(146 . 0.0) (170 . 0) (61 . 5) (348 . <Entity name: 7efd3f38>) (292 . 1) (282 . 
1) (141 . 0.0) (142 . 0.0) (63 . 250) (421 . 3355443))

Link to comment
Share on other sites

  • 2 months later...

Short example of Paper Space Viewport creation:

 

(defun c:addvp(/ pSp nVp)
 
 (vl-load-com)
 
 (setq pSp(vla-get-PaperSpace
     (vla-get-ActiveDocument
       (vlax-get-acad-object)))
nVp(vla-AddPViewport pSp
     (vlax-3D-point '(0.0 0.0 0.0))
     200.0 200.0)
); end setq
 ); end of  c:addvp

 

Creates Viewport 200.0 X 200.0 with center in 0,0,0 point.

Link to comment
Share on other sites

Is this possible also in model space?[/Quote]

 

Yes. But Paper Space Viewport (PViewport) and Model Space Viewport (Viewport) is absolutely different objects. For example how to create Model Space Viewport, split it to 3 windows and activate.

 

(defun c:splitvp(/ aVp actDoc)
 
 (vl-load-com)
 
 (setq aVp(vla-Add
       (vla-get-Viewports
   (setq actDoc(vla-get-ActiveDocument
       (vlax-get-acad-object))))"MyVPrt"))
 (vla-Split aVp acViewport3Above)
 (vla-put-ActiveViewport actDoc aVp)
 (princ)
 ); end of c:splitvp

 

You can also set width, height, centre, view etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...