cangelo3D Posted May 1, 2012 Share Posted May 1, 2012 I am totally new to vba programming so please help me in first baby steps Steps i need to compile a code for: user sets attributes used to calculate the amount of blocks to be inserted, user picks a point to insert first block, system creates an array of one row and i numbers of columns (i=defined by the calculation in previous step) user picks a point to insert second block, system creates an array of one row and i numbers of columns (i=defined by the calculation in previous step) and so on... anyone has any suggestions on how to proceed? i've only managed to do the calculations via userform so please, anything would be much appreciated! (i am running vba through autocad 2012) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 2, 2012 Share Posted May 2, 2012 With VBA future under a cloud go for VLISP pretty simple to do GETPOINT insert 1 block then either use the AARAY command or do form first principle using a double REPEAT row-column & POLAR command to work out new x value new y value. (repeat row (repeat column (insert xy ......... (setq x (polar x dist 0)) ..... ) (setq y (+ y rowdist)) ) Quote Link to comment Share on other sites More sharing options...
BlackBox Posted May 2, 2012 Share Posted May 2, 2012 1+ ... If you're already adept at coding VBA (ActiveX), then Visual LISP is a great way to pickup the ActiveX functionality, and learn an API that is (has been) portable for nearly all versions of AutoCAD. Otherwise, the logical step would be to learn VB.NET, and ultimately C#.NET, which is where I am currently... Not that I've mastered either Visual LISP, or VB.NET, but with C#'s popularity, it just seems like a worth while step in my development (pun intended). Quote Link to comment Share on other sites More sharing options...
fixo Posted May 2, 2012 Share Posted May 2, 2012 Answered here: http://www.theswamp.org/index.php?topic=41614.new#new Quote Link to comment Share on other sites More sharing options...
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.