Jump to content
Developer Wiki and Function Reference Links ×

Opinions on feasability for circuit tools


Recommended Posts

Hello all,

This past Friday I wrote my first Plugin tool which is a simple caster tool that draws the orthographic views of a caster based on user-input. It was nice project to get aquainted with the VS syntax, and a handy tool for myself and my fellow draftsmen at my workplace. I was generally impressed with the VS power and ease-of-use which inspired some thoughts on a more grandeous project, one which I'd like to get some thoughts on the feasability of tackling.

I've been using Vectorworks for about 7 years for drawing machinery used in theatrical automation equipment (a task I've always found VW/Minicad well suited for). Sometimes, because of the electromechanical nature of the projects I work on, I also need to draw up electronic schematcs and wiring diagrams as well as PCB layouts. I've often used Vectorworks for drawing up schematics and then manually converted the schematics into PCB layouts in other software. What I'd love to do is develop a set of drawing tools that allowed me to graphically wire up a circuit, and then export a PartsList and a NetList (which is just a list of every signal, and what pins are connected to the signal) to PCB software, thus saving me the hassle of making of connection manually in the PCB layout software.

There would need to be a few tools:1. IC tool--a tool that would generate a schematic version of an IC taking user input for package type (DIP, SOIC, etc.), number of pins, description of pins.2. Passive component tool--user selects type (resistor, capacitor, inductor, etc.), value (4.7kOhm, 200pF, etc.), package (axial, surface mount, etc)3. Wire tool--this seems to be the big one...a tool that behaves just like an oridinary polyline tool, but can detect what pins on what component it starts and stops at. Every wire placed would generate a new database record called "Signal" in the NetList. Each signal would have a distinct signal name as well as a list of which pins on which components were connected by the wire.4. Netlist export--exports the Netlist worksheet5. Partslist export--exports a partlist

From the user perspective you'd select a component tool place and spec your components, grab the wire tool and connect pins together. The wiring tool keeps updating the database with every wire drawn, so that at the end of the drawing session you just export you lists for use in the PCB layout application.

While this all may be ambitious, does it sounds feasible? My biggest concern would be how the wire tool can figure out which pins it has touched. Maybe the wire tool just records the coordinates for its starting and ending points in the database and then part of the exporting process is to scan the database for component pins that have the same coordinates as wiring points and compile those matches into the Netlist.

I have used dedicated electronic schematic software that does such a task, but the interfaces are often clunky and I prefer to work in Vectorworks when possible.

Whew, that was a mouthful! I'd love to hear thoughts about best ways to tackle this idea, or whether such an idea is best left untackled smile.gif" border="0

Link to comment

I was hoping someone would respond to your post so I could have the luxury of reading and musing. I feel you deserve a written response, as a silent one is much less satisfying, though it does answer your questions directly. Since no one has yet posted, here are my comments.

<< While this all may be ambitious, does it sounds feasible? >>

Yes, and yes. It is very ambitious, yet also very feasible. I have been designing circuit boards for IC test equipment using VW for more than 12 years. It is an excellent tool for the task. Most of what you outlined I have been able to accomplish, but not all of it in VW.

Many processes I accomplish outside of VW because I have more control of data structures, the computer and the execution speed is much greater. Your item, "4. Netlist export", is just such a beast. I have found that VS does not process large arrays very quickly, though it has sped up dramatically over the years. When the trace count is in the thousands, sorting through all the endpoints can take a good bit of time. If you were to write your routines with the SDK you might regain the speed benefits, but add another layer of complexity to your onion. One important missing item from VS is the linked list. I would not have been able to do many things I have achieved without it. Working entirely with arrays can be daunting.

<<My biggest concern would be how the wire tool can figure out which pins it has touched.>>

Though it is not a trivial exercise to check for connectivity, it is more a brute force task - save all coordinates and start comparing. That may seem like a big concern now, but you will find many larger ones if you proceed.

You will need an extensive library of parts to draw upon for your component tools. Reading one Component Vendor's catalog to find the right part is a non-trivial task, multiply that by the number of vendors out there and reach for your Excedrin bottle. Then, try to organize it for all the redundancy in the industry and you have created a full time job for someone.

In the end, I think the biggest hurdle you will encounter is selling the package. Even if it does all you set out to do, and does it well, most prospective clients, and there are quite a few, are entrenched in AutoCad or other PCB design environments. Just getting their attention will be difficult. Getting them to switch will be much harder.

If you are interested in attempting some of the things you have outlined, you might want to start designing it solely to suit your needs. There is still a lot of merit in having tools that do exactly what you need, and a lot of satisfaction in having built them.

Best wishes,Raymond

Link to comment

Hello Raymond,

Thanks for responding, that was beginning to feel like an uncomfortable silence smile.gif" border="0

I can appreciate your point that just handling the data structures will be a time consuming task within VW. My interest is really just to develop a set of tools to aid in the design some of my products, and as such I'll be continuing to add parts to my library as I go. I think trying to develop a comprehensive library is beyond my scope.

I'm still wrestling back and forth of whether or not to continue down this path. As I mentioned in my previous post, I've used (and spent good money on) other dedicated software that claims to accomplish the tasks of schematic capture and PCB layout, but I've found the reasonably priced ones (<$1000) to be glitchy and hampered by bad interfaces. The higher ticket software probably is free from such issues (though, perhaps not), but it's academic from my point of view because the upfront costs are prohibitive. What I have done in the past is simply draw the schematics in VW and then layout the PCB manually in TraxMaker or similar software. This process is fine for low-pin-count two-sided boards, but rapidly becomes unwieldy as the circuits become more complex.

I'm really curious to know more about the way you get your work done. If you have any pointers that you could share I'd sure appreciate it.

Thanks again for the response, if I end up doing anything with this idea I'll share some of the results.

Link to comment

It would be really hard to give you a comprehensive dissertation of how I develop a PCB design in a single post, so let's see if I can give you a good 10 cent tour.

I have an advantage with my designs in that the boards are used for IC testing, there is a lot of symmetry inherent in each design. For most designs there is only a single chip in the center of a tester specific piece of hardware. But for some, there are dozens, maybe hundreds, of relays and passive components. I do all the drafting in VW and I control placement with VS. This way I can control registration through all the layers. I have done designs up to 32 layers.

The secret to finishing any job is having the ability to output the work in a usable format. Until this year I had been exporting the data as PostScript, having the data plotted and then shipped to the PCB shop. This year I am exporting Gerber and sending the files directly to the PCB shop. Both forms of output use translators that I wrote to format the data. I have no idea how much of a time investment I have spent developing my tools, as it is a never ending process. I do know that I spent at least 3 solid months working on the Gerber translator. Postscript is a lot easier, as Gerber only has lines and arcs for basic primitives, and Gerber only prints one color at a time.

I usually start by placing the known "obstructions" first. By "obstructions" I mean holes and SMT pads. There will always be objects you save until the end to place, but get the big ones and the required ones down first. Second, mark all your power connections. This will give you a visual aid of pins you don't need signals on. The remaining pins will usually need traces to somewhere. Running traces is a hit or miss process. Sometimes I have to start over two or three times to keep things balanced. Doing it wrong should give you ideas on how to do it better, so don't be afraid to restart.

There are many possible requirements for the traces: equal line length for some or all traces, controlled impedance, predefined wiring or best fit for connectors, to name the most popular requests. Wiring spacing for BGA's is different from that for QFP's and DIP's, and different packages can really affect the layer count.

Lastly, run your power. It doesn't need to be last, but it is the way I do it. After all the traces are run, most, if not all the holes are in their final position. Knowing where the holes are makes it easier to distribute the power grid.

Each design is a puzzle. Each design is different and each has a unique set of constraints that needs to be met. Having a good understanding of VS is a great plus in getting the jobs done easier, faster and accurately. After all these years, I think I have derived more pleasure in designing the tools I use than in finishing the jobs, but it is the latter that pays. I know this is a short answer, but I hope it helps. Have fun deciding which way you want to go.

Best of luck,Raymond

[ 07-18-2002: Message edited by: MullinRJ ]

Link to comment

This has to be the most interesting thread I have seen on the whole board. Sorry I couldn't get time to put my $.02 in sooner.

At first I thought about doing your project and tried to come up with various implementations to manage the interconnection data. This was the big stumbling block for me since Vector Script has no dynamic data structures. This lead me down a number of ideas that were bounded on maximum sizes and really slow flat file external databases. In fact, initially I was going to say that this idea would never work.

Well it can work, it would have some limitations, and not be the most speedy implementation out there, but it can be done.

Here is how I would go about this...

Since you can't have any kind of dynamic data structure in your scripts, you would have to use object's and store relations between objects in the file as you go.

It would require an IC PIO that is able to draw itself in a number of sizes and configurations. It would also have to be able to generate it's own unique (or pseudo unique) ID, and store a connecting ID for each pinout or connection. This of course may limit the maximum number of pins on the IC, but I think that limit could be made high enough not to be an issue. Just how often do you see an IC with more than 4096 connections anyway?

This IC PIO would store for each pin, the ID of a related conductor (wire, lead, trace whatever you want to call it) which would be a path based PIO. These could be drawn on the drawing to connect from one IC to another.

Other objects, resistors, capacitors, etc. could also be represented as dumbded down IC PIOs with a limited number of pins and different 2D components.

The tricky part would be getting everything to keep track of what it was connected to. I know could then make another VS tool that used PickObject() to act as the glue to join the two and get them to share IDs.

Of course, every time you wanted to update a change, you would either have to re-link the changed objects (which would be prone to error) or devise a menu command that parsed all of the objects in the drawing and found coincident ones.

So to me it seems possible, but clunky and slow. Of course I'm also a true novice at this. My only advantage is I can run for help every time I get stuck on something. If only there was a way to have an object regenerate another object automatically. Then you could just change one object, and have it make all the other adjustments by following a chain.

Flame away, I'm sure there are some glaring errors in this...

Matthew GiampapaNNA Technical Support (This is why Tech Support doesn't support VS, because were not programmers)

Link to comment

Matthew,Your response has definitely opened the door for some serious Wish List items. Is there any hope of wishing for Dynamic Memory Allocation in VS? User defined data structures (Pascal records) would be a BIG plus. If you answer this question, will you have to shoot me?

On your comment about 4096 pin IC's, no, I have not seen any that big, yet, but it's probably not too far off. I have already done designs for some 1657 & 2092 pin BGA's. The good news regarding those monsters is that most (more than half) of the pins were Power and Ground pins. Still, by the time I finish writing this, the pin count will have gone up again. But to be practical, this would not be the limiting factor to a PIO approach.

Since PIO's cannot affect changes in other PIO's, could I also wish for a new object, a master PIO type that had the ability to force changes to related objects as in a Parent/Sibling relationship? I know this is not the Wish List board, but you did start some wheels turning.

Though keeping a realtime connection list sounds like the ideal way to make a "smart" layout system, it might be a lot faster to parse the existing connections after the editing is done. The downside to having everything done dynamically is that every small change would be accompanied by a ripple down effect when all the regenerations are done. I still think that having "smart" objects would be a useful addition to a well thought out system.

For years now, I have been exporting data to files and then reading the results with other routines, both internal and external to VW, to process the data. If objects can be made to export key attributes from a controlling script, or a script can extract and export the data from the objects, then I see no reason why a system could not be designed with the program as it is. Post processing the objects should be a lot faster than dynamically updating a database as you edit. But who am I to say it can't be done. More power to the motivated.

My gas tank hath runneth empty. Good night.

Raymond

Link to comment

Hello again,

Raymond thanks a bunch for the nickel tour, it's always helpful to get a glimpse of other's processes.

Matthew, it was really wild to read your post this evening since I spent the better portion of this afternoon implementing a similar approach! After kicking the idea around for a couple of days I've decided to plough ahead and see how far I can get to make some tools that help me get this specific project out the door.

Considering the limitations of PIO ability to interact with one another vs. the powerful database tools both within VW and other environments (i.e. VB,FileMaker, Access, etc.) I'm tacking a course that uses PIO's for each component flavor (IC, discrete passive, etc.). The IC tool allows the user to enter number of pins and package type, as well as a unique component name, passive components accept user entry for the package type and value (4.7kOhm, etc.). The component tools attach a "Pin Record" to each pin that contains fields like:

pin #component namepin X coordinatepin Y coordinate

So 28DIP IC will have 28 pin records all sharing the component name but with each with individual coordinate information. Every time a component is plopped onto the drawing or moved around it updates each of its pin records to reflect the new coordinates. I placed a few hundred of these quickly into a drawing without any noticeable slow downs.

I've also made a "Net Wire" tool that is basically a just a polyline tool that stores an attached record "Net Signal" with fields:

signal namestart point xstart point yend point xend point y

So at the moment I have these basic tools built that all keep track of their own pin coordinates, without any knowledge of connection to other objects. Since my end goal is to export a Parts List and a Net List, I'm going to write a menu tool that grabs a NetWire and use it's start and end points as search criteria to find connections between components, then grabs the next Netwire and repeats the process until all connections have been detected. This means that the most time consuming portion will be accomplished in a batch (rather than transaction) fashion. While this approach isn't as whiz-bang as it could be, I hope it will suffice for my current goals.

As this weekend progresses I ought have a sense for the scale of the database handling. At the moment I'm feeling fairly good about the prospects for success, as this sort of database work bears great resemblance to the work I've done in automation software development. I'll keep y'all posted if anyone's still interested.

Thanks again for the input, it's nice to get some thoughts bubbling.

Link to comment

Hello Again,

Here's an update (I promise this is the last one, unless anyone wants more info).

At the close of the weekend after a couple evenings worth of work things look pretty good. I've goosed up the Integrated Circuit tool so it now looks pretty and allows the user to enter pin labels, and turn the pin numbers on or off. The NetWire tool works pretty well, on creation of a new NetWire the tool checks to see what the highest current signal number is and then gives itself the next signal number. And most importantly the "Generate NetList" menu item is outputting text NetLists. The script scans all NetWires, combines any that have touching endpoints into one signal, and then writes out what pins are connected to the endpoints of each NetWire. The fact that this scanning only takes place when actually generating the output file, keeps the process of placing components and wires reasonably speedy. But this also means that you don't get any feedback about a connection being made/or not made. Though with a snap grid @ 1/8" and your constraints turned on, it's pretty easy to see visually whether a connection is made or not.

I've got about five more PIO's to make (resistor, capacitor, diode, connector, switch) and that'll do it for getting my current project done. Making these tools should be pretty quick since it'll be a lot of cut and paste from the IC tool. One of the most glaring limitations of the system is the inablilty to connect wires anywhere but endpoints (so you gotta drag every wire to a pin or other wire endpoint to make it count). But, this is something I can live with for a while. Another limitation is that the wires aren't "stuck" to the components, so if you move a component you have to drag the wire back over to the pins with the poly-edit tool. This is something that I can also live with.

Anyhow, thanks again for all the tips and ideas I'm still impressed by VS versatility and quick turn around time to work out new ideas.

Link to comment

Hiya,

Why has no one considered the Dynarray suite? This is a fully featured set of functions that manages user-defined variable sized arrays and you can define and change the dimensions at runtime.

This is in the shipping product.

hth,

Frank

Link to comment

Hey Frank,I actually use several dynamic arrays in my "Export Netlist" menu command. You're right, it's a handy data structure when dealing with lists of unknown or varying sizes. I'm glad the structure exists in VS as it made sorting and crunching lists much more pleasant than it could've been.

So far it all seems to be working out nicely...

Thanks

Link to comment
  • 3 weeks later...

I'm impressed with what Conners and Mullin have done. Is anyone willing to share code? I know it's asking a lot to part with something that takes so much energy and creativity to produce. My attempts at doing some of the above were not very useful, so I can appreciate what you are going through. I wish you well with your projects and if you develope plug-ins (free or otherwise) I would be interested if they contribute to the process of building a product that requires schematic capture, PCB design and sheet metal work.

Link to comment

Hello,Thanks for the compliment. I'll be happy to share the code, however I do want to find the time to put together a few pages of docs to go with it so that folks can understand what the plug-ins are and what they aren't. Additionally I'd like to have the docs give the more ambitious users a sense of what could be altered, appended, or improved should anyone feel motivated.

The boards I'm having made that used these tools (in combination with OsmondPCB, which is still downloadable as a free beta!) are coming back to me at the beginning of next week. After I check the final hardware that was produced I'll try to get the code and some docs up on my iDisk for public consumption.

Link to comment

Hello Gareth, I too have been using Osmond and DesignWorks (both are OS X now). I use an old PC program (Metalman) in Virtual PC to do my sheetmetal design, DXF out and into VW to get the parts to fit on the PCB and the connectors to line up with the sheetmetal, then convert the parts on the PCB to lines and DXF out and in to Osmond, build a library of the parts I used in DesignWorks and finish the board in Osmond.

Must be an easier way, but I haven't found it.

Don

Link to comment
  • 1 month later...

Hi everyone,

This sounds similar to the stuff I've developed for Broadcast installation planning. I construct schematic drawings out of devices (defined as groups of socket symbols and any other graphics needed to make them look nice), and connections (defined as polylines with a connector record containing the start & end socket id's). I can then derive a netlist and calculate cable lengths from a physical layout drawing.

Originally I considered using PIOs but found that I could keep things simpler using symbols and groups, and manage them with simple tools and menu commands. In general, I found that if you store your data as a record in the visual object which represents it everything behaves much nicer. e.g. the connection record is attached to the corresponding polyline so when you delete the polyline the connection disappears. Of course when you move an endpoint... there's always room for improvement.

My Connect Tool uses an event loop to provide a connection path which is orthognally constrained and gives you visual feedback on the path to be drawn. It's possible that a PIO could be made to work more intelligently in this respect but it would be less interactive.

I am now working on the next stage of the project which concerns modelling physical cable paths in buildings and assigning circuits to these. In some ways this might be seen as macro version of PC boards.

It's good to see that others are using VW in this way.

Conrad

Link to comment
  • 6 years later...
Guest BillV

This is a field I have been looking at to try to help some of my clients. I sell VW in New Zealand and have a number of clients in the Theatre and event industry.

I have been looking at Neaatworkz (http://www.neatworkz.tv/)

I have just started going through programme which runs within VW and it appears to do some of the tasks discussed here.

Bill

Link to comment

Hi, I've just been trying to do a similar thing, starting with a wire number tool, that puts a text line of a number, colour and size on the drawing, calculating the next available number from the records of existing numbers. What I want to do is bring all the wire number records into a spreadsheet to creat a wirelist for a control board

I'm now trying to extend it to read the start and end points from records of objects (terminals). I tried using GetPt() to pick the objects, but vectorworks crashes.

Any suggstions on how to select the object the user clicks on?

Link to comment
I tried using GetPt() to pick the objects, but vectorworks crashes.

Any suggstions on how to select the object the user clicks on?

Try:

???PickObject() - for picking the object under the cursor

???GetPickObjectInfo() - same as above, but will also return a handle for an object inside a container, such as a symbol in a wall. Not sure if it will find an object inside a group (from the outside a group), but it's worth a try.

???ForEachObjectAtPoint() - this is a procedural routine that will return all the handles that are under the cursor and allow you to do something with each of them.

HTH,

Raymond

Link to comment

Thanks for the suggestion Raymond. I tried using this, based on the example in the help files.

WHILE NOT GetPickObjectInfo(pX,pY,hPick,hSubObj,idummy) DO BEGIN

GetPt(pX,pY); { gets mouse posn}

END;

cText:= GetRField(hPick,'Terminal Record','Terminal');

SetRField(hPIO,'Wire Record','Start', cText);

It sort of works, in that I can read the data from the target object record and write it into my PIO record, but the pX, pY co-ordinates are always 0,0

I assume this is because VW is getting the co-ord relative to the PIO, not to the drawing. It always gets the data from the object at the drawing centre, even if I click on an object elsewhere.

So then I tried using MouseDown ( and extending the routine to get both ends of my wire)

Message('Click to place Wire Number text, Click on Start Item, Click on End Item');

REPEAT {Get Start Item}

UNTIL MouseDown(rPx,rPy);

bOK:=GetPickObjectInfo(rpX,rpY,hPick,hSubObj,idummy);

cText:= GetRField(hPick,'Terminal Record','Terminal');

SetRField(hPIO,'Wire Record','Start', cText);

REPEAT { Get end Item}

UNTIL MouseDown(rPx,rPy);

bOK:=GetPickObjectInfo(rpX,rpY,hPick,hSubObj,idummy);

cText:= GetRField(hPick,'Terminal Record','Terminal');

SetRField(hPIO,'Wire Record','End', cText);

It works! - except I have to click twice before anything happens, then it goes into the sequence as in the message.

I assume that's something else I'm doing wrong.

I've written a few scripts, but this is the first that really interacts with the user.

Thanks for your help

Steve

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...