HideQ Posted November 21, 2017 Posted November 21, 2017 For example lisp is drawing complicated shapes out of individual lines – is there a way to “pause” the display for the duration of the function, so that complete linework just show all at once, instead of each individual line with flickering screen? Many Thanks Quote
ronjonp Posted November 21, 2017 Posted November 21, 2017 You need to post the code you're using. Quote
Lee Mac Posted November 21, 2017 Posted November 21, 2017 Use entmake(x) or ActiveX methods rather than command calls. Quote
HideQ Posted November 22, 2017 Author Posted November 22, 2017 (edited) Thanks Lee Mac, I think that is the way to go. I am new to the lisp world and was asking this question for few applications, but currently I am struggling with LISP allowing me to quickly work with point cloud in AutoCad 2016. I am usually working with 3 viewports while modelling, e.g. slicing the cloud from side view and investigating from the top. I was hoping to move the crop of the point cloud up and down, similarly to cloudworx, so I came up with this crude solution: (defun c:crop (/ cor1 cor2); point cloud rectangular crop (setq cor1 (getpoint "\nselect first corner:")) (setq cor2 (getcorner cor1 "\nselect second corner:")) (setq 2dcor1 (list (car cor1) (cadr cor1))) (setq 2dcor2 (list (car cor2) (cadr cor2))) (setq cloud (ssget "x" '((8 . "Cloud")))) ; point cloud have to be on the "Cloud" layer (command "POINTCLOUDCROP" cloud 2dcor1 2dcor2 "inside") (setq csd (- (cadr 2dcor2) (cadr 2dcor1))) (princ) ) (defun c:fs () ;forward step (setq cloud (ssget "x" '((8 . "Cloud")))) (command "POINTCLOUDCROP" cloud "r") (setq 2dcor1 (list (car 2dcor1) (+ (cadr 2dcor1) csd))) (setq 2dcor2 (list (car 2dcor2) (+ (cadr 2dcor2) csd))) (command "POINTCLOUDCROP" cloud 2dcor1 2dcor2 "inside") (princ) ) (defun c:bs () ;backward step (setq cloud (ssget "x" '((8 . "Cloud")))) (command "POINTCLOUDCROP" cloud "r") (setq 2dcor1 (list (car 2dcor1) (- (cadr 2dcor1) csd))) (setq 2dcor2 (list (car 2dcor2) (- (cadr 2dcor2) csd))) (command "POINTCLOUDCROP" cloud 2dcor1 2dcor2 "inside") (princ) ) (defun c:csd (/ a) ;change the slice step distance (setq a (getreal "\nnew cloud slice value:")) (setq csd a) (princ) ) (princ) Among many issues with this lisp (work in progress) is the visible removing of the last crop, which can make it hard for examining the scan data. Any guidance on how to work around it or where to look for possible solution? ObjectARX seems to be the option, but it might be a slight overkill from my newbie perspective. Edited November 22, 2017 by SLW210 Added Code Tags. Quote
Dadgad Posted November 22, 2017 Posted November 22, 2017 Welcome to CADTutor HideQ. You should read this link, if you will be posting code on the forum. http://www.cadtutor.net/forum/showthread.php?9184-Code-posting-guidelines Quote
HideQ Posted November 22, 2017 Author Posted November 22, 2017 Hello Dadgad, Thank you for the link.I fell a little guilty, especially since I cannot edit this post I will use those guidelines in the future. Quote
SLW210 Posted November 22, 2017 Posted November 22, 2017 Fixed for you. The # sometimes will not work in some browsers, to do it manually just [NOPARSE] Your Code Here[/NOPARSE] = Your Code Here 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.