Jump to content

Recommended Posts

Posted

Hi Guys,

 

From your recommendations I have started to try to use the Visual LISP Editor in ACAD, and, I must say, it does make it easier to identify code with it's novel colour-coding. 8)

 

But, I am having a problem getting the code to line up correctly - i.e

 

If I have code as follows:

 

(defun c:fubar ()
    (if
       (/= (setq pt1 (getpoint "\nSelect Point: ")) nil)
       [color=Red][b]([/b][/color]progn
           (command "_circle" pt1 "5")
           (princ "\nA Cirlcle has been drawn. ")
       [b][color=Red])[/color][/b]

 

I would normally align the two highlighted brackets, to make the code clearer. :P

 

But in VLIDE, I get I result as follows:

 

(defun c:fubar ()
    (if
       (/= (setq pt1 (getpoint "\nSelect Point: ")) nil)
       [color=Red][b]([/b][/color]progn
           (command "_circle" pt1 "5")
           (princ "\nA Cirlcle has been drawn. ")
           [b][color=Red])[/color][/b]

 

And so, my question is: "Is there a shortcut to tab back to the previous indent?" (so that the brackets can be alligned easily.. :huh:)

 

Thanks in advance for any advice and help. :P

 

PS. I have attached a jpg, if you still don't know what I'm going on about...

Bracket Problem.jpg

Posted

click here, it will format all your code. The button to the right will format a selection

J1.jpg

Posted

Thanks lpseifert,

 

That button adds the necessary closing brackets to my code, but will add them without the correct indentation, as shown in attachment.

Bracket Problem 2.jpg

Posted

I copy/pasted the code you supplied into Vlide, clicked the format button and it worked for me... see image above. Try hitting Ctrl+Alt+F and see what happens.

Posted

I think your close paren choice is incorrect, I think it needs to be the 3rd choice, but Im not sure

Posted

AHHHHH Found it :P

 

Just changed the format option to "close at new line with outer indentation"

 

And it worked just like you posted.

 

Thanks once again for all your help lpseifert.

 

Edit: CmdrDuh, your post appeared just as I posted this... you were spot on :P

Posted

> Lee Mac

 

Don't you know :idea:

 

Double click before opening bracket or after closing bracket will to highlight expressions to oposite bracket.

vlisp_brackets.gif

  • 2 weeks later...
Posted
> Lee Mac

 

Don't you know :idea:

 

Double click before opening bracket or after closing bracket will to highlight expressions to oposite bracket.

 

 

ASMI -- not related to the problem, but how did you create that GIF?

Posted

This is Camtasia Studio software to make screen movies with titles and sound, mostly *.avi and *.mpeg format, but animated *.gif also possible.

Posted
This is Camtasia Studio software to make screen movies with titles and sound, mostly *.avi and *.mpeg format, but animated *.gif also possible.

 

 

Is that available free off the net?

Posted
Is that available free off the net?

 

Free for $ 229 :)

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