Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ideas for a plotting script

1 REPLY 1
Reply
Message 1 of 2
carl3ZPF6
224 Views, 1 Reply

Ideas for a plotting script

I have a VBA script that uses a excel input and generates drawings that look like the attached. These can be very large and are not very useful on their own. What I need is a script that can break this down into human readable sheets with a title block and sub-bom like the following:

carl3ZPF6_0-1717432830465.jpeg

I need a sub-bom on each sheet that shows the qtys of each point and each line. All of the points between lines are blocks, and the lines themselves are polylines (some doubled over). To count the lines my plan was to update my VBA script to put a COGO point with a unique category (red/black, or yellow etc) descriptor behind the mid point of each line (if the lines were only one color then I could just count the polyline but since there are color combos I dont think I can do that) I fully acknowledge the mini-map in the lower left may not be possible (but open to ideas). The excel source document has information that breaks the document into "blocks" (green below) and "sub-blocks" (blue below), my thought is these can be used for logic about what to plot (sometimes we like to plot whole blocks other times sub blocks). Not sure how to best get this information into the dwg though (right now it is in excel and not part of the plotted output).

carl3ZPF6_1-1717433539596.png

Ideally I would like this to be fully automated (click a macro run and all the sheets and sub boms plot), my backup plan was to have user selection of windows within ACAD to select what is on a sheet then sheet and sub bom are created for that selection (one at a time). No idea where to even start here (vba? Dynamo? Lisp?) any help is appreciated.

Tags (3)
1 REPLY 1
Message 2 of 2
norman.yuan
in reply to: carl3ZPF6

What you asked is by no means a trivial work at all. It would take a GOOD AutoCAD programmer from anywhere a couple of weeks to a couple of months to work on it (depending on the finally decided specifications/requirements, which is quite vague in your description). Considering the complexity of the work (since you mentioned Cogo point, which indicates Civil 3D is required, rather than plain AutoCAD), I'd do it with .NET API, not with VBA/Dynamo/Lisp: that task is simply too complicated to deal with simple "script".

 

If you can do some Acad programming, you might be able to break the work down to small chunks and ask specific question here (or in .NET forum). If you have no ideal how this can be done programmatically, I'd suggest you find an ABLE AutoCAD programmer/software developer do it for you.

 

Norman Yuan

Drive CAD With Code

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report