Jump to content

Semi Automated Rev Cloud using polyline


Spinxy

Recommended Posts

Hi,

I have my automated Rev Cloud with Rev Triangle working with a retang box, now i'm working on makeing one using polylines. however i'm not sure what to do with the userdefined inputs, as the number of user inputs is unknown.

 

^C^Ctilemode;0;(setq a(getvar "clayer"));-layer;M;Revision;;PL;\\\\\\\C;revcloud;arc;10;10;ob;l;;-Insert;"Rev_Tri.dwg";\1;1;0;(setvar "clayer" a)

 

so far i have PL;\\\\\\\C;

 

however this is closing the pl after the 7th click, where it may need to be closed sooner or later but i'm unsure how to write this variable in a macro.

 

anyone have any ideas?

Link to comment
Share on other sites

Maybe draw pline first finish command any layer then change its layer to revision and make it a revcloud. Change "L" for last

 

The codes getting pretty long maybe its time to change it to ^c^c(load "plinerev") ? your already using lisp!

 

As many points as you like in pline.

 

Why not just one routine and do P or B or X ? You can do it as a menu, toolbar or shorthand you can pass the P or B to the program so it does not ask. (setq ans "B") if ans "" ask for p or b

Edited by BIGAL
P or B
Link to comment
Share on other sites

Hey Bigal,

 

Cheers for the response,

i'm happy to move onto lisp, however i only want to move on slowly trying to learn the procedures properly.

I take it the lisp file will be named plinerev.lsp

do i have to specify the folder it's stored in, in my support paths? or should these files just be added to the autocad support directory?

would i have to load the lisp each time? or add it to my startup suite? or are there other ways of loading this?

Would be much appreciated if you or anyone could put my macro into a lisp file (laid out how lisp files should be written) so i can use this as a starting point.

 

your P or B or X comment has lost me a bit would be great if you could explain that to me.

sorry i'm new to writing lisp's but very keen to learn.

 

Thanks

Link to comment
Share on other sites

P B X polyline box or something else would be a choice as to what you want to convert.

 

The code as start

 

(defun C:plrev ()
(load "plrev")
)

 

Just save it in acaddoc.lsp then save plrev.lsp in a directory in your search path, we have our lisps in a \autocad\lisps on the server.

second step some code for plrev not tested but a start.

 

(setvar "tilemode" 0)
(setq clay (getvar "clayer"))
(princ "\nselect polyline")
(command "-layer" "M" "Revision" "" "" )
(command "revcloud" "arc" 10 10 ob)
(command "-Insert" "Rev_Tri.dwg" 1 1 0) 
(setvar "clayer" clay)

 

Type plrev to start it will test it tomorrow

Link to comment
Share on other sites

Cheers thats great,

where do i find acaddoc.lsp file?

i'm running both 2008 and 2010 the files i'm finding are acad2008doc.lsp and acad2010doc.lsp

where in that file should i place that text? does it matter?

Cheers

Link to comment
Share on other sites

There is multiple files that can be used for autostart ups we use autoload.lsp and it works fine and updates don't effect it, its just located by the "support files" path setting within "config". Also acad.mnl acad.lsp ?

 

Not finished need to find some time

;(setvar "tilemode" 0)
(command "-layer" "M" "Revision" "" )
(initget 1 "P p R r e E ")   ; 1 is must answer
(setq ans  (getkword "Please enter option Polyline Rectang Existing <P R E>"))
(setq clay (getvar "clayer"))
(cond  
   ((= ans "p") (princ "p")
   ; draw pline
   ;(setq obj (entlast))
   )
  ( (= ans "b")
  (setq pt1 (getpoint "\1st corner pt of box"))
(setq pt2 (getpoint pt1 "\2nd corner pt of box"))  ; pt1 draws a temporary line 
  (command "rectang" pt1 pt2)  ; draw box 
  (setq obj (entlast))
  )
  ((= ans "e")
  (setq obj (entsel "\nselect object"))
  ) 
) ;end cond
; existing object 
(setvar "clayer" "Revision")
(command "revcloud" "arc" 10 10 ob obj "n")
(command "-Insert" "Rev_Tri.dwg" 1 1 0) 
(setvar "clayer" clay)

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