Hmm.. Posted June 14, 2008 Posted June 14, 2008 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.. Quote
VovKa Posted June 15, 2008 Posted June 15, 2008 (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) ) ) Quote
Hmm.. Posted June 17, 2008 Author Posted June 17, 2008 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)) Quote
bkxd98 Posted September 2, 2008 Posted September 2, 2008 "You cannot create viewport objects with entmake" - AutoCAD help of entmake function. Quote
ASMI Posted September 2, 2008 Posted September 2, 2008 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. Quote
Hmm.. Posted September 2, 2008 Author Posted September 2, 2008 Is this possible also in model space? Quote
ASMI Posted September 2, 2008 Posted September 2, 2008 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. Quote
Hmm.. Posted September 2, 2008 Author Posted September 2, 2008 Oh thats nice! You resolved one of my eldest problems! Good luck.. Quote
Recommended Posts
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.