AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

Reply
Distinguished Contributor
fdna49
Posts: 151
Registered: ‎12-11-2003
Message 1 of 11 (334 Views)

Symbol/table naming for power supply

334 Views, 10 Replies
07-08-2004 01:36 PM
I am trying to create a symbol for a power supply.
The problem occurs when I try to insert the new block, everything is fine until I try to assign it a catalog number.
It seems that no matter what I name the block, it wants to reference the PS catalog table.
All blocks in the PS table are pressure switches.
I would like the block to have its own table (PSU or similar)
Maybe someone already has one for an OMRON S8VS-06024

Thanks
Chad
Valued Contributor
Jay Mackey
Posts: 62
Registered: ‎06-21-2004
Message 2 of 11 (334 Views)

Re: Symbol/table naming for power supply

07-09-2004 07:12 AM in reply to: fdna49
Hi Chad,

I assume that you had already defined the PS table yourself, since it doesn't exist in my catalog. I am at the same point as you, just starting with AE 2004 with a new project. I've made a PS and used a name like HPS1_001.dwg.

Here is the pertinent info from the 'online' manual:

(It is referring to how Catalog look-up deals with the block name and the search for the relavant table)

"If the block name is 8 characters or more, it starts lopping characters off of the end of the block name and looks for a table name match. This continues until a match is found or there are less than 8 characters remaining in the truncated block name. Example: full block name is "HCR1MCTRL_W_SUPPR". AutoCAD Electrical first checks for a parts table "CR1MCTRL_W_SUPPR". If not found, it starts lopping characters off of the end of the block name and looks for a table name match. Table names that it would look for in sequence would be "CR1MCTRL_W_SUPP", "CR1MCTRL_W_SUP", ... until it got down to "CR1MCTR". If no match on this last table name, AutoCAD Electrical finally checks for table "CR" (the first two characters of the block name)"

So what is happening with our block names is that it first looks for a table called "PS1_001" in my case, and if my block name happened to be longer than 8 chars, it truncates a character, and looks again. Finally, it looks for a 'PS' table. Since that table exists in your catalog, it goes ahead and pulls up that table. So if you manually create a table named PSU, and name your block something like "HPSU_001.dwg", then it will pull up that table when you do a Catalog look-up.

- Jay
*Nate Holt
Message 3 of 11 (334 Views)

Re: Symbol/table naming for power supply

07-09-2004 10:51 AM in reply to: fdna49
"Jay Mackey" wrote in message news:2420538.1089382356303.JavaMail.jive@jiveforum1.autodesk.com... > Hi Chad, > > I assume that you had already defined the PS table yourself, since it doesn't exist in my catalog. I am at the same point as you, just starting with AE 2004 with a new project. I've made a PS and used a name like HPS1_001.dwg. > > Here is the pertinent info from the 'online' manual: > > (It is referring to how Catalog look-up deals with the block name and the search for the relavant table) > > "If the block name is 8 characters or more, it starts lopping characters off of the end of the block name and looks for a table name match. This continues until a match is found or there are less than 8 characters remaining in the truncated block name. Example: full block name is "HCR1MCTRL_W_SUPPR". AutoCAD Electrical first checks for a parts table "CR1MCTRL_W_SUPPR". If not found, it starts lopping characters off of the end of the block name and looks for a table name match. Table names that it would look for in sequence would be "CR1MCTRL_W_SUPP", "CR1MCTRL_W_SUP", ... until it got down to "CR1MCTR". If no match on this last table name, AutoCAD Electrical finally checks for table "CR" (the first two characters of the block name)" > > So what is happening with our block names is that it first looks for a table called "PS1_001" in my case, truncates a character, and looks again, until it finally reaches the 'PS' table. Since that table exists in your catalog, it goes ahead and pulls up that table. So if you manually create a table named PSU, and name your block something like "HPSU_001.dwg", then it will pull up that table when you do a Catalog look-up. > > - Jay
*Nate Holt
Message 4 of 11 (334 Views)

Re: Symbol/table naming for power supply

07-09-2004 10:54 AM in reply to: fdna49
You can also try this. Rename your symbol from HPS1_xxxx.dwg to HPW1.dwg or something like that. Now it should default to a new catalog table called "PW". Put your power supply lookup data in this new table. "Jay Mackey" wrote in message news:2420538.1089382356303.JavaMail.jive@jiveforum1.autodesk.com... > Hi Chad, > > I assume that you had already defined the PS table yourself, since it doesn't exist in my catalog. I am at the same point as you, just starting with AE 2004 with a new project. I've made a PS and used a name like HPS1_001.dwg. > > Here is the pertinent info from the 'online' manual: > > (It is referring to how Catalog look-up deals with the block name and the search for the relavant table) > > "If the block name is 8 characters or more, it starts lopping characters off of the end of the block name and looks for a table name match. This continues until a match is found or there are less than 8 characters remaining in the truncated block name. Example: full block name is "HCR1MCTRL_W_SUPPR". AutoCAD Electrical first checks for a parts table "CR1MCTRL_W_SUPPR". If not found, it starts lopping characters off of the end of the block name and looks for a table name match. Table names that it would look for in sequence would be "CR1MCTRL_W_SUPP", "CR1MCTRL_W_SUP", ... until it got down to "CR1MCTR". If no match on this last table name, AutoCAD Electrical finally checks for table "CR" (the first two characters of the block name)" > > So what is happening with our block names is that it first looks for a table called "PS1_001" in my case, truncates a character, and looks again, until it finally reaches the 'PS' table. Since that table exists in your catalog, it goes ahead and pulls up that table. So if you manually create a table named PSU, and name your block something like "HPSU_001.dwg", then it will pull up that table when you do a Catalog look-up. > > - Jay
Valued Contributor
Jay Mackey
Posts: 62
Registered: ‎06-21-2004
Message 5 of 11 (334 Views)

Re: Symbol/table naming for power supply

06-27-2005 06:44 PM in reply to: fdna49
Nate,

Is there a hard-coded limitation that tables have to be named either with just 2 characters that match the second and third letter-positions of the symbol name, or that the table name must exactly match the symbol name minus the first letter, or that the table name must have 8 or more characters that exactly matches a string within the name of the related symbols?

We wanted to have tables that generally matched the NFPA component designation conventions, i.e., PWS for power supply, with our power supply symbols being something like "HPWS_xxx.dwg"

Also, we just started using a MS SQL Server-based database program for parts purchasing, stocking, etc. One scheme I've been thinking about is doing a database export/import from our main company database into the default_cat.mdb, refreshing it regularly. Parts data would be entered once in the company database, and then the default_cat.mdb would be 'refreshed'. I think this scheme would work best with putting all our parts in the misc_cat table in the default_cat.mdb. Does this make sense? Is this do-able?

Thanks,
Jay
Active Contributor tcn
Active Contributor
tcn
Posts: 46
Registered: ‎01-14-2005
Message 6 of 11 (334 Views)

Re: Symbol/table naming for power supply

06-28-2005 03:51 AM in reply to: fdna49
Jay,

We have a database like the one you mentioned. I used the external database links so that when I look up a component AcadE goes to our database instead of the default_cat.mdb. We had to write some software to make it work but it is a lot better than having to worry about keeping two databases up. The wd.env file has an entry for external database lookup wd_xcat, and there is an example file named wd_xcat.lsp that shows the data structure. You can put the footprints in your database also. To this point I really like it.

Ted
Valued Contributor
Jay Mackey
Posts: 62
Registered: ‎06-21-2004
Message 7 of 11 (334 Views)

Re: Symbol/table naming for power supply

06-28-2005 07:55 AM in reply to: fdna49
That sounds great. Do you know if your company database is MS SQL Server or what?

Do you have any other details on how it was implemented?

Previous to asking the question above, I did a search of the ACE 2006 help and didn't find anything specific to connecting to an external database, so I wasn't aware that it was possible.

Thanks,

Jay
*Mike Spitzer \(Autodesk\)
Message 8 of 11 (334 Views)

Re: Symbol/table naming for power supply

06-28-2005 08:18 AM in reply to: fdna49
Jay,

I think you can find additional information on this in the FAQ under
question Q7.1.1. Read over that section and see if this is what you are
looking for.

Mike
wrote in message news:4887055@discussion.autodesk.com...
That sounds great. Do you know if your company database is MS SQL Server or
what?

Do you have any other details on how it was implemented?

Previous to asking the question above, I did a search of the ACE 2006 help
and didn't find anything specific to connecting to an external database, so
I wasn't aware that it was possible.

Thanks,

Jay
Valued Contributor
Jay Mackey
Posts: 62
Registered: ‎06-21-2004
Message 9 of 11 (334 Views)

Re: Symbol/table naming for power supply

06-28-2005 09:57 AM in reply to: fdna49
OK, Thanks Mike, that was useful. I had downloaded the latest FAQ yesterday, but had not read all the way through it.

I've written VB6 and .NET database apps, so I think we can do this.

Jay
Active Contributor tcn
Active Contributor
tcn
Posts: 46
Registered: ‎01-14-2005
Message 10 of 11 (334 Views)

Re: Symbol/table naming for power supply

06-28-2005 10:10 AM in reply to: fdna49
Jay,

We are using an older database called Uni-data. I think you will have a much easier time because your using MS SQL Server.

When you press the catalog lookup you will get a packet of data from ACE in the wd_xcat lisp routine. It will containing any existing part information and whether it came from the schematic component window or from panel builder.

The following are the steps I used:
1) From the lisp routine I took that data and wrote it to a text file.

2) From LISP call VBA routine.

3) VBA - Read data from text file and enter it into the user interface screen. Display the user interface screen. The user interface screen is a custom VBA screen. This screen has controls that will query the database to allow us to do different type of searches, by manufacture, part type (relay, limit switch,...) . Then we can do secondary searches, say part numbers or descriptions.

4) When done selecting parts VBA writes the new part information to the text file. This completes the VBA routine so execution returns to LISP.

5) LISP reads the data from the text file and packages it for return to ACE using the C:wd_rtrn_2wd command.

When I have time I am going to get rid of the text file and use the user string ( $USERS1-6 ) variables to pass the data back and forth.

We implemented the sub-components like ACE does in our database also. But, we put the sub-component part numbers under the main component. It seemed easier.

When the data is passed to the wd_xcat one of the first fields will either be SCH or PNL. If it is SCH then the request if coming from a component edit dialog box like you would see if you did a component edit on a schematic or a panel layout. If it is PNL then the data is being passed from the External Program button on the Schematic Component parts list in Panel Builder, which will allow you to pass back the footprint block name.

I hope this all makes sense.
Ted
Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.