Jump to content

Recommended Posts

Posted

hi.. need help on creating lsp that can:

 

> do left array by mouse picking distance

 

my lisp example;

````````````````

(defun c:C8()
(setq SEL (ssget))
(command "-array" SEL "" "r" "1" "8")
(princ))

i tried out on 'row' array similar as above lisp,

both direction works with mouse picking distance!

but unluckily it didn't work for column arraying to the left!?! :(

 

 

Please do help tweak/amend the above in order to work!!! thanks 8)

Posted (edited)

use getdist

 

[color=black](defun c:C8 ( / sel pt1 pt2 ds)[/color]
[color=black] (setq SEL (ssget))[/color]
[color=black]  (setq pt1 (getpoint "\nPick 1st point:")[/color]
[color=black]      pt2  (getpoint pt1 "\nPick 2nd point:")[/color]
[color=black]      ds (distance pt1 pt2)[/color]
[color=black]        ds (if (< (car pt2)(car pt1)) (* ds -1.0) ds))[/color]
[color=black] (command "-array" SEL "" "R" "" "8" ds)[/color]
[color=black] (princ)[/color]
[color=black] )[/color]

Edited by pBe
retarded response

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...