AutoCAD LT General

Reply
Member
johnniesiliz
Posts: 5
Registered: ‎11-29-2012
Message 1 of 5 (240 Views)
Accepted Solution

Writing a plug-in to work with Autocad LT 2011

240 Views, 4 Replies
02-11-2013 11:29 AM

Does anybody have experience with writing a plug-in with visual basic?  Is there a specific version of visual that works with Autocad LT 2011?  Or will express 2012 work too?

*Expert Elite*
dgorsman
Posts: 5,056
Registered: ‎10-12-2006
Message 2 of 5 (236 Views)

Re: Writing a plug-in to work with Autocad LT 2011

02-11-2013 11:46 AM in reply to: johnniesiliz

LT doesn't support plug-ins or other programmatic extensions.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


*Expert Elite*
hwalker
Posts: 1,084
Registered: ‎07-14-2004
Message 3 of 5 (218 Views)

Re: Writing a plug-in to work with Autocad LT 2011

02-12-2013 01:25 AM in reply to: dgorsman

I don't know if it's changed it LT 2011 or not, BUT in LT 2009 you can have an external vb program run in Autocad.

 

I have one which draws steel shapes for me.

 

I have a text box called txtbSWid which has the following done to it everytime my program loads up

 

txtbSWId.LinkMode = 0                                  '0 = reset
txtbSWId.LinkTopic = "AutoCAD LT.DDE|system"           'establish DDE link
txtbSWId.LinkMode = 2

 

 

The below is all the information I get from my program which draws a single polyline. en$ is the variable for the enter key

 

swibeam$ = "_ortho" + en$ + "off" + en$
swibeam$ = swibeam$ + "_pline" + en$ + "none" + en$ + "0" + en$ ', True 'draw pline begining @ last point
swibeam$ = swibeam$ + "@" + SWIwidthx$ + "<0" + en$
swibeam$ = swibeam$ + "@" + SWIStartToe$ + "<270" + en$
swibeam$ = swibeam$ + "Arc" + en$ + "@" + SWiToeChord$ + "<227.5" + en$
swibeam$ = swibeam$ + "Line" + en$ + "@" + SWITotalFlange$ + "<185" + en$
swibeam$ = swibeam$ + "Arc" + en$ + "@" + SWiRootChord$ + "<227.5" + en$
swibeam$ = swibeam$ + "Line" + en$ + "@" + SWIdmtrx$ + "<270" + en$
swibeam$ = swibeam$ + "Arc" + en$ + "@" + SWiRootChord$ + "<312.5" + en$
swibeam$ = swibeam$ + "Line" + en$ + "@" + SWITotalFlange$ + "<355" + en$
swibeam$ = swibeam$ + "Arc" + en$ + "@" + SWiToeChord$ + "<312.5" + en$
swibeam$ = swibeam$ + "Line" + en$ + "@" + SWIStartToe$ + "<270" + en$
swibeam$ = swibeam$ + "@" + SWIwidthx$ + "<180" + en$
swibeam$ = swibeam$ + "close" + en$

 

After it has collected all that data the following line is run

 

txtbSWId.LinkExecute swibeam$ + "move last  0,0 "

 

The line below just ends the program completely

Unload SWI

 

 

To run my program in Autocad I have a button with the following command in it

^C^C_ai_startapp myprogram.exe

*Expert Elite*
pendean
Posts: 21,650
Registered: ‎11-06-2003
Message 4 of 5 (208 Views)

Re: Writing a plug-in to work with Autocad LT 2011

02-12-2013 04:55 AM in reply to: hwalker

Question: does your VB program run more than once in an LT2009 session?

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
*Expert Elite*
hwalker
Posts: 1,084
Registered: ‎07-14-2004
Message 5 of 5 (200 Views)

Re: Writing a plug-in to work with Autocad LT 2011

02-12-2013 07:50 AM in reply to: pendean

Not too sure what you mean, but if you mean after it's drawn one polyline and shutdown can I immediately run it again to draw another. The answer is yes

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community