Jump to content

Recommended Posts

Posted

Please help translating the AutoLISP.I do not know Basic, do not even know how to begin

 

drawbar.txt

Posted

It can be done but this is a big program doesn't look complicated but you need to go line by line etc look up the lisp help not VLisp put in words like "distance" not "getdistance" usually just remove the get from the word.

 

(setq pi 3.141159265) or just use pi() 

Diam = ThisDrawing.Utility.GetDistance(, vbCrLf & "Diameter <" & DEFAULTDIAMETER & "> ")
(setq diam (getreal "\nDiameter "))

If Diam <= 0 Then
(if (< diam 0) (setq diam 3.0))  

MsgBox "Diameter must be bigger then zero", vbOKOnly + vbCritical
(alert "Diameter must be bigger then zero")

Just one thing a getdistance in lisp a distance is between 2 pts but in your code it would be a (setq Doorn (getreal "\Bending diameter")) as your after a single response not an actual "distance".
Doorn = ThisDrawing.Utility.GetDistance maybe should be Doorn = ThisDrawing.Utility.GetReal

Posted

Jan_ek any more ?

 

Paste your VBA code to notepad put a ; at start of every line then add line in lisp code it can be done I am converting stuff back to VLISP no support for VBA and .NET I am to old.

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