oompa_l Posted December 3, 2013 Share Posted December 3, 2013 Hi I'm not sure what the way to go about doing what I want. I have a pretty extensive equipment list that I want to drive the deneration of simple plan represenations - each would be a rectangle with width and length and maybe some text fields identifying the obect. Does anyone have any solutions for something like this? Do I need to write it from scratch in LISP? thanks O Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 3, 2013 Share Posted December 3, 2013 It would make any answers more to the point, if you could post a few samples to show what it is you want to achieve, and the sort of information you have to start with. Quote Link to comment Share on other sites More sharing options...
oompa_l Posted December 3, 2013 Author Share Posted December 3, 2013 i've attached a starting point I just put together. I made a dynamic block with width and length parameters. I made some attributes for the equipment's id, its height and weight. My csv will have fields like the following: ID Program Qty Equipment Name L (in) W (in) H (in) Wt (kg) MACH01 MACHINING 5 Kondia Mills 60 65 85 1200 MACH02 MACHINING 8 Maximart Mills 67 72 87 1000 MACH03 MACHINING 17 Bridgeport Mills 60 65 82 1180 MACH04 MACHINING 20 Colchester Lathes 105 50 52 1500 I want each instance of the block to pick up the width and height and represent them in the rectangle. I want the "ID" "H" and "Wt" values to show up as attributes. Alternatively, each instance could be its own block I suppose, instead of the same one being adjusted by its dimensions. Please let me know if you need more info to understand. thanks so much!EQP-BLOCK-02.dwg Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 3, 2013 Share Posted December 3, 2013 Are you wanting to create a library of blocks. Or insert blocks into a drawing ? Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 3, 2013 Share Posted December 3, 2013 This is a simple output for a partial block generated using excel, you can copy and paste the text directly into Autocad's command line, or run it as a script. It can also be copied directly from an excel spreadsheet or using VBA output as a text file or Autocad script file. Having said that LISP may offer better options, if any LISP programmers are about. -attdef ID MACH01 20,20 3 0 Program MACHINING rectangle 0,0 60,65 -block test 0,0 all -insert test 0,0 1 1 0 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 3, 2013 Share Posted December 3, 2013 The only thing missing in a simple script is how you are going to do the insertion point for the block, compare the two lines below expects the block MACH01 to exist use steven-g code to create. NOTE the spaces not "," Insert MACH01 (getpoint) 1 1 0 "MACHINING 5 Kondia Mills" 60 65 85 1200 MACH01 MACHINING 5 Kondia Mills 60 65 85 1200 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.