Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

They said I had to use Visual Lisp. So where do I start?

Anonymous

They said I had to use Visual Lisp. So where do I start?

Anonymous
No aplicable

Hello AUTOCAD 2013/2014/2015/2016/2017.

 

How are you?

 

Fine, thank you.

 

So yes, the company is going AutoCad. We're an engineering firm that does design for the energy industry. Our designs involve pipes and steel shapes.

 

Today I am interested in pipe supports.

 

I want to use dynamic blocks that represent the various configurations of the pipe supports we use.

 

I want to be able to read a list from an Excel spreadsheet, then insert the appropriate db into the drawing at the appropriate point and set the parameters of the db according to the values on the sheet.

 

Pretty simple right?

 

I could do this with VBA or even MicroStation MBE but alas I must use VLIDE.

 

So I have to learn a new language.

 

Rather than dive in and solve this issue by stealing code snippets from all over, I'd rather approach it systematically and learn VLisp the right way.

 

So I'm really looking for advice on where to start.

 

Classroom?

 

This forum?

 

One on one private?

 

What say you forum?

 

Thanks

0 Me gusta
Responder
Soluciones aceptadas (1)
977 Vistas
12 Respuestas
Respuestas (12)

Jonathan3891
Advisor
Advisor
Solución aceptada
The best places to start are here:

http://www.afralisp.net/index.php

http://www.jefferypsanders.com/autolisptut.html

You can also visit the Visual Lisp section of this form:
http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130

Jonathan Norton
Blog | Linkedin
0 Me gusta

Anonymous
No aplicable

Thanks DSM_dude. I am going thru the afralisp.net/index.php pages now. 

 

This is what I was looking for. :cara_con_una_leve_sonrisa:

0 Me gusta

TheCADnoob
Mentor
Mentor

Id talk to your reseller. with the advent of the industry collections model you will likely have access to things that already have these sorts of systems built into them. Plant 3D pull parts from a database and you just drop them in. super easy! you can control the parts using selected standards and its a real easy interface to work with. They also have a steel section of Plant 3D. Some of the structural guys i know says it didnt do enough so they are using advanced steel, but i believe Autodesk has made and is making improvements since the last time i spoke to those guys. 

 

http://www.autodesk.com/products/autocad-plant-3d/overview

 

http://www.autodesk.com/products/advance-steel/overview

 

Im not saying dont learn lisp, but i wouldn't spend time reinventing the wheel especially if you will already be paying for the license of these programs under the SAS collections model. 

 

 

CADnoob

EESignature

zph
Collaborator
Collaborator

VLIDE isn't required for dynamic blocks. While learning to create and use dynamic blocks can have a bit of learning curve, it isn't as massive an undertaking as learning AutoLISP/VL (programming languages), especially if you are already familiar with the ACAD interface.

Linking excel spreadsheets to AutoCAD files can be done using the AutoCAD link manager and table commands.

I don't know the full scope of what you need to do, but for these two tasks, in my opinion, you won't need to learn any new programming languages.

0 Me gusta

dgorsman
Consultant
Consultant

Another vote for Plant3D, especially if you're going to be working in 3D; aside from P&IDs and isometrics very little is done in 2D these days.  Dynamic blocks are kinda-sorta working in 3D but they are only intended for use with 2D drawings.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Me gusta

Anonymous
No aplicable

Hey CADnoob, thanks for the input.

We too are starting to use Plant3D and Advanced Steel, so yeah we may already have the tools we need.

We are really right at the beginning of a whole new era for the company and probably don't know what we don't know yet.

And this afternoon I find that we are going to retain VBA so I'll be going that way. Least resistance you know.

0 Me gusta

Anonymous
No aplicable

Hey zph, nice to know there are other options for getting to Excel data.

 

I was planning to use VLIDE only to access list info and then configure the appropriate db programmatically.

 

Essentially doing by automation what we currently do by hand.

 

But I did enjoy exploring dynamic blocks yesterday, and I find that whole world to be very much like Inventor - yet another package we are cutting our teeth on.

 

Thanks

0 Me gusta

Anonymous
No aplicable

Hey dgorsman, yes we are slow to come around to the fact that the world really is in 3D.

 

The company was using CADAM when I started in 95 and that implementation was never fully realized.

 

We switched to MicroStation then and again never squeezed the sugar out of that app either.

 

Only in the last few years have a few lone wolves gone off alone into total 3D integration.

 

Now with the new initiative into AutoCad, Plant3D, Inventor and Advanced Steel we really have no excuse.

 

The wheels turn slowly.

0 Me gusta

JamesMaeding
Advisor
Advisor

One thing you will find is AutoCAD has several ways to automate it.

Your task of reading an excel file, then inserting blocks and setting dynamic props, is honestly an advanced first task.

The fact is the chunks of code to do that already exist in these DG and theswamp.org, but you have to be familiar with lisp to hook them all together.

VBA is still around, but its an extra install now and not what you want to spend energy on.

 

The real payback for learning lisp is its super useful to control the startup of autocad.

Say you want to set the autosave time, or set units to decimal, its all easy to do with lisp.

You might ask why use the VLIDE instead of a text editor?

The reasons are:

1) it color codes things

2) you can check parenthesis matching by double clicking before or after a paren, and it selects the "block" enclosed by the parens.  If you get unexpected results, your parens do not match and you need to fix.

3) You can select a statement like (STRCAT "123" "ABC"), and right click on it and say inspect. It runs the statement and shows the return value in the dialog.

4) You can run Tools->check text in editor to catch errors

5) you can set a breakpoint with F9, then Tools->Load text in editor (close the dumb white screen that pops up). Then run your function and it will stop and let you walk through the code, while inspecting any variable along the way.

 

Once you get used to lisp, you will see it is super handy for startup, making "keyboard" shortcuts.

BTW, AutoCAD is best run with key-ins using left hand as the command line always has focus, and the space bar is like enter.

so to zoom extents, you can always hit escape, type Z then space, then E, then space (all with left hand)

You should have that escape key polished in about 6 months.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Me gusta

Anonymous
No aplicable

Hey jmaeding, thanks for the detailed response.

 

Well I found out late yesterday afternoon that VBA is not gone.

 

The outfit that is supporting us recommended us to stay with VBA.

 

This is good news to me as I really did not want to have to learn yet another programming language.

 

Since I typed in my first basic algorithm in the wee hours way back in the 70s I have learned, BASIC, FORTRAN, C, X-Windows syntax, the native tongue of a CAD system called Vertex, an app developed in Finland for the parent company, CADAM, MicroStation Basic MBE and VBA for Excel and MicroStation.

 

Somehow I managed to miss AutoCAD all together but she finally caught up with me.

0 Me gusta

JamesMaeding
Advisor
Advisor
You should look at .net then. It has a vb syntax you could pick up fast.



Sent from my Verizon 4G LTE smartphone

internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Me gusta

Anonymous
No aplicable

Yes that is another solution they offered and considering VBA may go away we probably should be using .NET.

0 Me gusta