DECHAL Posted January 29, 2009 Posted January 29, 2009 Can anybody set me on the right path to get started on VBA. I need tutorials. Tutorials for first timmers! ((step by step))... I'm using AutoCAD 2009. I need to get up and running. regards, DECHAL Quote
rkmcswain Posted January 29, 2009 Posted January 29, 2009 VBA is dead. If you don't already know it, I would suggest not wasting time trying to start now. Depending on what you are trying to do, you could either use lisp or .NET Having said that, http://www.afralisp.net/ has some tutorials on lisp and VBA. With .NET, it depends on whether you want to use VB or C# or F# or.... Quote
DECHAL Posted January 29, 2009 Author Posted January 29, 2009 Thanks for info. What I have is a beam with a fitting on each end. The beam can be verious lengths and the fitting on each end can be many. I want a way to insert the beam and select length and which fitting I need on beam. Regards, DECHAL Quote
Lee Mac Posted January 29, 2009 Posted January 29, 2009 Take a look at Jeffery Sanders website also: http://www.jefferypsanders.com/autolispbeg.html Very useful. Also this is a good resource: http://klobouk.fsv.cvut.cz/~chour/Lisp/Chapter%201.htm Quote
rkmcswain Posted January 29, 2009 Posted January 29, 2009 That almost sounds like an application for a dynamic block. Have you considered that? Quote
dbroada Posted January 29, 2009 Posted January 29, 2009 That almost sounds like an application for a dynamic block. Have you considered that? I think that is where he started before I "sent" him here. http://www.cadtutor.net/forum/showthread.php?t=31979 Quote
DECHAL Posted January 30, 2009 Author Posted January 30, 2009 Cheers Lee, That what I'm looking for. DECHAL Quote
dbroada Posted January 30, 2009 Posted January 30, 2009 here is the code I started developing. It is nowhere near complete but shows that you can influence the dynmic properties immediately after insertion. I don't think you can do it before. Private Sub TerminalRail() Dim BlockRefObj As AcadBlockReference Dim BlockPos As Variant Dim PropList As Variant BlockPos = ThisDrawing.Utility.GetPoint(, "Block position ") Set BlockRefObj = ThisDrawing.ModelSpace.InsertBlock(BlockPos, "TerminalRail TS35", 1!, 1!, 1!, 0) PropList = BlockRefObj.GetDynamicBlockProperties PropList(0).Value = 77.5 'distance PropList(2).Value = 375# 'length ThisDrawing.Regen acActiveViewport End Sub you might as well have the block to play with too. TerminalRail TS35.dwg Quote
Lee Mac Posted January 30, 2009 Posted January 30, 2009 Cheers Lee, That what I'm looking for. DECHAL No Probs, if you check the related pages on the home page of CADTutor, you will find more links also Quote
DECHAL Posted February 2, 2009 Author Posted February 2, 2009 Dave, Thanks for the code/dwg. Just a quick Question. How do i get it to work? Is it "Load Application". Nothing seems to be happening. Any pointers? Regards, DECHAL. Quote
dbroada Posted February 2, 2009 Posted February 2, 2009 a long winded explanation can be found here http://www.cadtutor.net/forum/showthread.php?t=30608 or look into VBALOAD & VBARUN (I think) Quote
Recommended Posts
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.