News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Adding multiple connection points to a shape at once

Started by JB-Tech Racing, February 16, 2023, 11:07:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JB-Tech Racing

Hey guy, not sure this is the right section, but here goes.
I design wiring harnesses and schematics, so Im often adding in components that have LOTS of connection points. Some upwards of 200 points.
Is there a way to add multiple connection points too a shape without using the shape sheet and doing it one at a time?
Ive been trying to use excel data to do it, but just cant quite figure it out.

Any help is appreciated, thanks.

wapperdude

This topic may be of interest...uses macro to create shape with connection points and labels.  Should work for your high pin count.
Shape Creation: with connections pts & labels using macro
Visio 2019 Pro

Surrogate

Quote from: wapperdude on February 16, 2023, 11:28:27 PM
This topic may be of interest...uses macro to create shape with connection points and labels.  Should work for your high pin count.
Shape Creation: with connections pts & labels using macro
There is no hyperlink

wapperdude

Visio 2019 Pro

JB-Tech Racing

I downloaded the Macro but Im struggling to figure out how to run it. Im new to visio, so go easy on me. Ive been googling ALOT!

wapperdude

Ah!  I forgot what state of development that this is in.  It is in manual entry, so you have to open up the macro and enter the desired information...number of connection points per side, connection point spacing.  The macro will build the minimjum sized shape to accommodate these settings.  For example, you might want to do settings like this for 200 points:

'**********************************************************
'Manually enter the desired pin to pin spacing and
'the number of pins across each edge of the shape.
'The pin to pin spacing will become a main shape property that
'can be accessed from the shape.  Scales both the pin spacing
'and the size of the shape.
'**********************************************************
'
    iRow = 0
    pSpc = 0.1
    nlp = 60
    nrp = 60
    ntp = 50
    nbp = 30
   
    pX1 = 1     'Initial shape placement coordinates
    pY1 = 1
   


But you could put all 200 on a single side.

Once these changes are made, run the macro.

One way to access the macro is  1) enable Developer Mode, then on the left side of Developer tab, (or Alt+f11) select Visual Basic. This opens the Visual Basic Window.  On the left side you should see something like Visio Objects>ThisDocument.  Dbl clk ThisDocument.  This displays code in main window.  Scroll down until you see the section of code as shown above.  Edit per my example or whatever you need.  Then run the code.  With 200 connection points this might take awhile.
Visio 2019 Pro

JB-Tech Racing

Thank you! Im getting it figured out. Now to add labels to each pin. I'll see if I can figure that out just poking around. I see it automatically labels them 1-X. So now I just gotta figure out how to add the ECU Pin# and its function.

wapperdude

#7
The "manual" way to enter pin labels...  With the shape selected, open shapesheet and scroll to Connection point section.  Using dbl quotes, enter label text into the D-Cell.  Also, the pin type C-cell entry may be changed here if desired.   DO NOT edit the pin label directly as this will clobber the link to the connection point D-Cell.

When this code was written, there was no anticipation for high pin counts, thus manual entry was OK method.  It could be automated if, say, an Excel file existed which contained the desired info.
Visio 2019 Pro

RudySchneider

#8
Quite some time ago, I had a similar need for schematics I was creating.  So, I made a stencil of various "standard" components, including boxes and electrical connectors with connection points.  These were to be used on E-size sheets, so they were rather large, but I gave each object the ability to define the spacing between connection points.  Anyway, I've put three shapes --- vertical and horizontal electrical connectors, and a box with connection points around its periphery --- and attached it here.  If you can't use it directly, you may be able to edit the Shape Sheet(s) to better suit your needs.

There are no problems, only opportunities


Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 315 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1160KB.
Tokens: post-login.
Cache hits: 13: 0.00135s for 26,764 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]