Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Auto-Generating Control One Lines

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
gmitera
1504 Views, 12 Replies

Auto-Generating Control One Lines

gmitera
Explorer
Explorer

The team I'm a part of creates TONS of these very simple one line diagrams. No built-in information, just the linework.

typical one line.PNG

Some of these can have 50 or more devices connected to a single panel. We're wondering if there's any way we could automate this process using a spreadsheet. The goal is to be able to list each device's tag, description, and type of wiring in a spreadsheet and then have it autogenerate a diagram like this. We'd really like to be able to specify whether each device branches off of another one. The closest I've come is using an action macro to generate a generic diagram and stop for user input for each text item. This, however, isn't much faster than just copy-pasting things I've got no idea how to reference the data from Excel, and I really have no idea how we could dynamically deal with the branching. Thanks in advance!

0 Likes

Auto-Generating Control One Lines

The team I'm a part of creates TONS of these very simple one line diagrams. No built-in information, just the linework.

typical one line.PNG

Some of these can have 50 or more devices connected to a single panel. We're wondering if there's any way we could automate this process using a spreadsheet. The goal is to be able to list each device's tag, description, and type of wiring in a spreadsheet and then have it autogenerate a diagram like this. We'd really like to be able to specify whether each device branches off of another one. The closest I've come is using an action macro to generate a generic diagram and stop for user input for each text item. This, however, isn't much faster than just copy-pasting things I've got no idea how to reference the data from Excel, and I really have no idea how we could dynamically deal with the branching. Thanks in advance!

Labels (2)
12 REPLIES 12
Message 2 of 13

Tomislav.Golubovic
Advisor
Advisor

I *think* AutoCAD Electrical can do what you want? I haven't used it in years but I have a feeling it has something like that. I could be wrong, but looking at what you do, AutoCAD Electrical might be a good fit.

0 Likes

I *think* AutoCAD Electrical can do what you want? I haven't used it in years but I have a feeling it has something like that. I could be wrong, but looking at what you do, AutoCAD Electrical might be a good fit.

Message 3 of 13
leeminardi
in reply to: gmitera

leeminardi
Mentor
Mentor

The simple answer is yes, Excel could be used to create an AutoCAD script file to complete the drawing. It would help to see a few examples of possible drawings.  For example, what would a drawing with 50 devices look like (along with the corresponding Excel file)? Would the "JB" block be stretched to accommodate 51 lines coming into it?  The script would be run in a file that has the lines and components that are common to any configuration. 

lee.minardi
0 Likes

The simple answer is yes, Excel could be used to create an AutoCAD script file to complete the drawing. It would help to see a few examples of possible drawings.  For example, what would a drawing with 50 devices look like (along with the corresponding Excel file)? Would the "JB" block be stretched to accommodate 51 lines coming into it?  The script would be run in a file that has the lines and components that are common to any configuration. 

lee.minardi
Message 4 of 13

gmitera
Explorer
Explorer

The problem I'm running into with circuit builder is that it's almost too heavy duty for what we're doing. Simple linework only, in this very specific style.

0 Likes

The problem I'm running into with circuit builder is that it's almost too heavy duty for what we're doing. Simple linework only, in this very specific style.

Message 5 of 13
gmitera
in reply to: leeminardi

gmitera
Explorer
Explorer

Here would be an example of a larger diagram. The most I've seen for branches is 4 or 5.

0 Likes

Here would be an example of a larger diagram. The most I've seen for branches is 4 or 5.

Message 6 of 13
leeminardi
in reply to: gmitera

leeminardi
Mentor
Mentor

Perhaps a good place to start would be to create a script that would generate the text that's inside the red box from an Excel file.

 

Can you post the Excel file that you would see generating this text and the AutoCAD drawing that would result?

 

lee.minardi
0 Likes

Perhaps a good place to start would be to create a script that would generate the text that's inside the red box from an Excel file.

 

Can you post the Excel file that you would see generating this text and the AutoCAD drawing that would result?

 

lee.minardi
Message 7 of 13
gmitera
in reply to: leeminardi

gmitera
Explorer
Explorer

For a diagram like this:

Capture.PNG

We'd like to start with something like this in Excel:

AUTODESK FORUMS EXCEL.PNG

Thanks to everyone!

0 Likes

For a diagram like this:

Capture.PNG

We'd like to start with something like this in Excel:

AUTODESK FORUMS EXCEL.PNG

Thanks to everyone!

Message 8 of 13
leeminardi
in reply to: gmitera

leeminardi
Mentor
Mentor

Can you post the Excel and AutoCAD files not just an image?  I'd like to experiment with them.

 

lee.minardi
0 Likes

Can you post the Excel and AutoCAD files not just an image?  I'd like to experiment with them.

 

lee.minardi
Message 9 of 13
gmitera
in reply to: leeminardi

gmitera
Explorer
Explorer

Here you go. I really appreciate you taking the time to look this deep into this!

0 Likes

Here you go. I really appreciate you taking the time to look this deep into this!

Message 10 of 13
leeminardi
in reply to: gmitera

leeminardi
Mentor
Mentor
Accepted solution

@gmitera Attached is a VBA Macro enabled Excel file that includes a program to create an AutoCAD script file that can be used to create part of your drawing from data contained in an Excel file.  I concentrated on placing text in approximately the correct locations.  The program is a work-in-progress and can be enhanced to add additional geometry.  I thought I would share this version with you so you could assess whether this has potential for developing further.

 

Open the Excel file and click the "Create Script File" button.  Add additional rows of data as you want.  

image.png

The user interface could be more friendly but this is a start.

 

Lee

 

lee.minardi
0 Likes

@gmitera Attached is a VBA Macro enabled Excel file that includes a program to create an AutoCAD script file that can be used to create part of your drawing from data contained in an Excel file.  I concentrated on placing text in approximately the correct locations.  The program is a work-in-progress and can be enhanced to add additional geometry.  I thought I would share this version with you so you could assess whether this has potential for developing further.

 

Open the Excel file and click the "Create Script File" button.  Add additional rows of data as you want.  

image.png

The user interface could be more friendly but this is a start.

 

Lee

 

lee.minardi
Message 11 of 13
gmitera
in reply to: leeminardi

gmitera
Explorer
Explorer

This is awesome. A few tweaks and it'll be perfect. THANK YOU!

0 Likes

This is awesome. A few tweaks and it'll be perfect. THANK YOU!

Message 12 of 13
leeminardi
in reply to: gmitera

leeminardi
Mentor
Mentor

@gmitera You're welcome.  I hope you find the program helpful.  I would have liked to clean up the user interface  and some of the line creation  functions a bit before posting the file but had to turn my attention to other matters.

Let me know if you have any questions o would like to add other features.

 

Lee

 

lee.minardi
0 Likes

@gmitera You're welcome.  I hope you find the program helpful.  I would have liked to clean up the user interface  and some of the line creation  functions a bit before posting the file but had to turn my attention to other matters.

Let me know if you have any questions o would like to add other features.

 

Lee

 

lee.minardi
Message 13 of 13
gmitera
in reply to: leeminardi

gmitera
Explorer
Explorer

Honestly, a less involved UI is going to suit us better. I haven't had a chance to dive into the VBA macro yet, but as of right now the code only seems to place boxes around VFDs. I'm planning on jumping in and working on it a little bit, but as the creator do you have any high level suggestions for me?

0 Likes

Honestly, a less involved UI is going to suit us better. I haven't had a chance to dive into the VBA macro yet, but as of right now the code only seems to place boxes around VFDs. I'm planning on jumping in and working on it a little bit, but as the creator do you have any high level suggestions for me?

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