jan_ek Posted December 4, 2010 Posted December 4, 2010 Hey I wanted to write something like: Copies polylines that are on layer WARSTWA1 (15,000 copies on the right) Then added to select the objects you copied (preferably as a list) Each copied then transform the region. I'm trying to do something with "ssget" X "," but somehow this does not go Help:) Quote
Michaels Posted December 4, 2010 Posted December 4, 2010 15.000 Copies that may break down your Autocad program undoubtly. Quote
ReMark Posted December 4, 2010 Posted December 4, 2010 15,000 copies sure is a lot. Are these closed polylines? I ask because you mention transforming them (the 15,000 copies?) into regions. What are you drawing? Can you post an example of what you want to start with and what you want the finished object to look like? One example of each will be sufficient. Thanks. Quote
jan_ek Posted December 4, 2010 Author Posted December 4, 2010 probably badly written. It was a shift to the right of 15,000 units (setq en (ssget "_x" (list (cons 0 "LWPOLYLINE") (cons 8 (strcat "WARSTWA1" "*")) ) ) (command "._copy" en "" "m" "0,0,0" "50000,0,0" "E") Quote
ReMark Posted December 4, 2010 Posted December 4, 2010 15,000 units? Metric or Imperial? Shift as in move? It looks like you are using the copy command not the move command. Sorry, I'm still not following you. And what about using Region? Where does that come in? Quote
Michaels Posted December 4, 2010 Posted December 4, 2010 may be something like this .... (setq ss (ssget "_x" '((0 . "LWPOLYLINE")(cons 8 (strcat "XXX" "*"))))) (command "_.copy" ss "" '(0. 0. 0.) (polar '(0. 0. 0.) 0.0 15000.)) Quote
jan_ek Posted December 4, 2010 Author Posted December 4, 2010 Language problems:) So yes, I want to do something like this: I emphasize that all the polylines on layer xxx. I have a list of variables (the selected polylines). Each element of the copies of 15000 mm to the right. copied item transform the region and adds to the list (variable). Each item in this list sequentially stretch(extrude) (solid 3d) 500 mm perpendicularly to the model Quote
Lee Mac Posted December 4, 2010 Posted December 4, 2010 (edited) This? (defun c:test ( / doc spc ss n r ) (vl-load-com) ;; Example by Lee Mac 2010 www.lee-mac.com (setq spc (vlax-get-property (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (if (= 1 (getvar 'CVPORT)) 'PaperSpace 'ModelSpace) ) ) (if (ssget "_X" '((0 . "LWPOLYLINE") (8 . "XXX*"))) (progn (vlax-for o (setq ss (vla-get-ActiveSelectionSet doc)) (vla-move (setq n (vla-copy o)) (vlax-3D-point '(0. 0. 0.)) (vlax-3D-point '(15000. 0. 0.)) ) (vla-put-closed n :vlax-true) (vla-AddExtrudedSolid spc (car (setq r (vlax-invoke spc 'AddRegion (list n)))) 500. 0.) (vla-delete n) (mapcar 'vla-delete r) ) (vla-delete ss) ) (princ "\n** No LWPolylines Found **") ) (princ) ) Edited December 5, 2010 by Lee Mac Quote
jan_ek Posted December 5, 2010 Author Posted December 5, 2010 Thanks that's it. An awful lot here, "vla". You will have to train a little bit to understand the code. Thank you very much. Maybe one more question: What commands add or cut a solid 3d Quote
jan_ek Posted December 5, 2010 Author Posted December 5, 2010 (edited) To add to the list of created shape. I mean somewhere that can later be appealed to the variable. For example, an object X, rotate 90 degrees How to remove the region after the establishment were Edited December 5, 2010 by jan_ek Quote
Lee Mac Posted December 5, 2010 Posted December 5, 2010 How to remove the region after the establishment were Updated. 123 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.