Programming and Automation for Wiring Diagrams

Hi!

I'm new to the forum and pretty new to CAD as well, but I hope to have found the right category for my thread.

I'm a project manager/engineer with a system integrator establishing audiovisual and conferencing solutions.

Therefore we need to create a whole set of drawings (wiring diagrams, rack layouts, wall and room layouts etc.) for our technicians and technical support staff. Right now we are working with MS Visio, whats nice to get going quickly but - honestly - is a pain in the %&§ with a lot of automatisms MS has embedded in their software. I think, in therms of customization, we should get the switch working fully with CAD.

With establishing BricsCAD in our company, I'd like to set up an environment with some really helpfull automations that would save us a lot of time.

The most important customizations would be for the wiring diagrams:

1. Every wiring connection needs to have a unique number (eg. AAxxx für Analog Audio, DVxxx for Digital Video) This number should be displayed horizontally on each end of the polyline connecting two blocks. Depending on the cabling type the polyline needs to have a colour code. Internal cabling should be solid, external cabling should be dotted lines.

Is there a way to program this? Ideally I just define the cabling type, internal/external and the numbers are set automaticly in ascending order als well as the polyline is set to the right colour/style.

At the end we should be able to extract the cabling infos to a excel/csv file to feed our label printer and set up a cabling list for the electrician to draw the external/structural cables for us.

2. The blocks should always follow strickt design rules:
- There's a header description in the defined colour of the device type
- The orange edge in the upper right states if the device is delivered by us or the customer
- Stating manufacturer and model
- The colour code of the connectors is the same as the cabling
- There is a unique name on the left bottom
- If there are more devices of one type, there is an index in the lower right corner.
Example:


There will be a block database for the most common devices, but I would like to make shure that we can quickly create new blocks for devices that follow all the stated design rules. I already looked at the parametric blocks. But I somehow don't think, this would solve our problems.

I hope that at least most of the things I described are possible. If for a start, we need proprietary code that we have to pay for, that's ok. In this case I would really appreciate suggestions on who I clould contact to get this done. At the end, I would really much understand it myself. So I can make adjustments if needed and we don't get too dependent in our very vital planning process.

Looking forward to hear from you guys,
Arne

Comments

  • aridzv
    edited January 2022
    You're actually talking about something called "P&Id" drawing.
    since you say you do not have much experience in bricscad itself generally, and lisp programming specifically,
    I would suggest as a first step to consider using "P&Id" add-ons/softwares.
    you can find some in bricscad 3Rd party store (search for "P&Id").

    if you do Insists on building a system in bricscad using blocks - it is definetally possible using parametric blocks and corresponding lisp's that handlle them.

    start with making blocks as a seperate regular drawings that are inserted in to your main drawings.
    when you need a new block,
    just open a block drawing,change it to what you need and save as a new one with differant name.

    I've attached a simple block that I use for "P&Id" drawings and a simple lisp that help me handle it.
    open a new drawing,set the units to mm,insert the pipe block in to that drawing,appload the lisp and run it.
    maybe this will give you some directions.

    regards,
    Ari.
  • In addition to the comment of aridzv, it sounds like you need some professional help, an application specific crash course, to start understanding concepts. You'll be up and running in a long day ;-)
  • What you want can be done pretty easy draw a line and label it, there is numerous add to text lisp out there. For me 40+ years doing cad obivously Acad. Over at cadtutor 15,000+ posts

    If you post a sample dwg that would be best as it shows what you want. The label may be best as a block with 1 attribute makes doing schedules much easier. Close dwg start again so when add a line 1st thing is find last number used and add 1.

    Probably also do a select type from a menu



    Happy to talk about custom services send a request to info@alanh.com.au can provide more details.
  • Thanks a lot for your responses. I'll have a look at the "p&id" addons and the example drawing the next few days. That will probably help me a lot for a start. Just didn't know, what to look for in the app store;)

    In addition to the comment of aridzv, it sounds like you need some professional help, an application specific crash course, to start understanding concepts. You'll be up and running in a long day ;-)

    You are totally right! Unfortunately I find it quite hard to find good tutorials and workshops to start off with that are pointing in the right way. Most of my knowledge is based on watching free stuff on youtube and reading the software documentation... and that's quite time consuming. Do you have any suggestions how to approach that?

    I made a sample diagram for you to understand, where we'd like to go.
    At the end, it would save us a lot of time, if we could automate cabling lists (ID/source/destination/type) patchbay assignments, device lists, power consuption by location and a lot more. Right now all these tasks are done manually by the systems engineers.
  • MDunn
    edited February 2022
    Arne,
    You can “extract” “attributed text” data to a *.csv file, by creating blocks w/ “attributed text” as shown in attachment.
    You can define whatever you desire for your extraction data w/in the block as per the naming of the attribute.
    In your sample dwg, block “Samsung - VH55R-R” is used multiple times; you can make the “dumb” data simple text (not needed for editing, same in every block of that name), & “smart” attributed text that is editable per need & can also be extracted to a database (*.csv file & into *.xlsm or *.xlsx).
    The attached example is a simple one from our Title Block.
    The underscore is a key designator in the attribute so it can be extracted as unique data.
    Here is a sample of lisp code that does that:
    (Defun C:SS() ;;Launches Lisp Routine
    ; INIT
    ; determine from which blockname we have to pull which attributes
    (Setq BlockName "TB-F" ;;EDIT
    TagName1 "TITLE_1" ;;Discipline (Column 2) ;;EDIT
    TagName2 "TITLE_2" ;;Area (Column 3) ;;EDIT
    TagName3 "TITLE_3" ;;Description (Column 4) ;;EDIT

    Note the underscore in each TagName, which makes it unique.
    This is only a small part of the 3 page lisp routine for extracting data from blocks.
    If you have further questions let me know. Or perhaps take it to email.
    Hope this helps.
    Mike
  • ALANH
    edited February 2022
    As much as I hate to say it here would Autocad electrical help ?

    Have you done a google ? A lot of programmers to do Electrical are starting to offer more open packages ie Autocad & Bricscad versions.

    https://boa.bricsys.com/applications
    Type electrical appears to be a few there.
  • Ewen Wallace
    edited February 2022
    Shameless plug but I wrote a collection of apps that does a fair bit of this and more, I have been doing it myself for more than 20 years. https://www.CableSchedules.com - email me: Ewen at that site if you want to chat.

    https://www.linkedin.com/in/cadbloke/ if you're curious.
  • Wiebe van der Worp
    edited February 2022
    You are totally right! Unfortunately I find it quite hard to find good tutorials and workshops to start off with that are pointing in the right way. Most of my knowledge is based on watching free stuff on youtube and reading the software documentation... and that's quite time consuming. Do you have any suggestions how to approach that?


    Not really, my German is "rostig".

    I made a sample diagram for you to understand, where we'd like to go.
    At the end, it would save us a lot of time, if we could automate cabling lists (ID/source/destination/type) patchbay assignments, device lists, power consuption by location and a lot more. Right now all these tasks are done manually by the systems engineers.


    In addition to the above... A few pennies...
    You may want to do more with blocks, adding attributes. With a Lisp-command it is (later) easy to read (un)visible attribute values for further processing, putting them in csv-format and process them in a spreadsheet (for example)..
    Consider drawing with Snap on (F9) and set SnapStyle and SnapUnit (avoid adaptive snap).
    Consider using palettes (easy to make) or buttons (easy to distribute) for your block collection.
    Consider using a .dwt template for your projects, with linetypes, textstyles and so on properly defined.