Spec Editor - Can You Output the Program Code?

Posted by: SaturnV

Spec Editor - Can You Output the Program Code? - 01/06/22 04:06 PM

I believe you cannot alter the value of the "Program Code" field, but can you output it via Excel? I tried to edit the template by adding a column for "Program Code" (and various similar header styles) but it does not output. Does anyone know the answer to this question?

SaturnV
Posted by: Vanman

Re: Spec Editor - Can You Output the Program Code? - 01/06/22 10:58 PM

I have edited the program code directly with an XML editor, however the next time that you sync/update from catalog it reverts back to the original value.

Why are you needing to edit the program code values ?
Posted by: Matt.Worland

Re: Spec Editor - Can You Output the Program Code? - 01/07/22 08:35 AM

It could be dangerous to update the Program Codes, that is how the software knows pipe is pipe and an elbow is an elbow. The Sort Sequence by default matches the program code and that can be modified. Just note, if it is modified, your BOM sorting will be affected.

Now that there are Custom fields, it's a good idea to create a field for your purpose instead of re-purposing default fields.
Posted by: Vanman

Re: Spec Editor - Can You Output the Program Code? - 01/09/22 10:38 PM

Agreed 100% Matt. I recall the time I edited program codes was when there was a bug with version 2013 if not mistaken. All elbows, SR and LR were given the same program code from what I remember.
Posted by: SaturnV

Re: Spec Editor - Can You Output the Program Code? - 01/10/22 07:04 AM

I want to repeat that I do not want to alter the value, I merely want to report the value in the Excel file. That value is tied to the P&ID and valve tagging and I just wanted to compile those values to reference.

So the question is: Is it possible to output the program code via Excel? I could write a script to pull that information but rather do it the "easy way".

SaturnV
Posted by: Matt.Worland

Re: Spec Editor - Can You Output the Program Code? - 01/10/22 09:53 AM

Sorry, I saw Output and my brain went to update. Im not seeing an option to export that data in the Spec Editor for a spec. In the catalog, you can go to View --> Component Types and that will show a list of all of the program codes for all items in CADWorx.

If you need it to be exported from a list of items in a spec, and you haven't modified your Sort Sequence you can export the Sort Sequence and that is usually a one for one, matching the Program Code.

You could also get the data from a model, pid database, model database.

Our SOCKETWorx tool allows for a robust export and management of specs and catalogs, but it doesn't appear the Standard Spec Editor can export the Program Code field.
Posted by: SaturnV

Re: Spec Editor - Can You Output the Program Code? - 01/10/22 11:21 AM

Originally Posted By: Matt.Worland
Sorry, I saw Output and my brain went to update. Im not seeing an option to export that data in the Spec Editor for a spec. In the catalog, you can go to View --> Component Types and that will show a list of all of the program codes for all items in CADWorx.

If you need it to be exported from a list of items in a spec, and you haven't modified your Sort Sequence you can export the Sort Sequence and that is usually a one for one, matching the Program Code.

You could also get the data from a model, pid database, model database.

Our SOCKETWorx tool allows for a robust export and management of specs and catalogs, but it doesn't appear the Standard Spec Editor can export the Program Code field.


Thanks Matt. When you say you can get the data, is that via DATAEXTRACTION? We are not tied into a database with our P&ID.

SaturnV
Posted by: Matt.Worland

Re: Spec Editor - Can You Output the Program Code? - 01/11/22 10:16 AM

There is a PIDEXPORT command also, but neither Data extraction or the pid export will get you the program code unless you modify your blocks to include the program code as an attribute. But that will only work for blocks, no lines.

Without updating all blocks to include the attribute, to get the program code from a pid, you need to get it from the database or by using code and looking at the xdata.

The example below is from a valve and the line with 65 is the line for the program code.

Code:
Command: XDLIST
Select object:
Enter application name <*>:
* Registered Application Name: CFD1
* Code 1002, Starting or ending brace: {
* Code 1000, ASCII string:
* Code 1000, ASCII string:
* Code 1000, ASCII string:
* Code 1000, ASCII string: 65
* Code 1071, 32-bit signed long integer: 4
* Code 1070, 16-bit integer: 128
* Code 1070, 16-bit integer: 303
* Code 1005, Database handle: D5
...
Posted by: SaturnV

Re: Spec Editor - Can You Output the Program Code? - 01/12/22 10:35 AM

Thank you Matt for that.

Is there a way to get the USER1 field (user defined field) from the CADWorx spec into the USER1 data field of P&ID, just like the TAG data does?

SaturnV
Posted by: Matt.Worland

Re: Spec Editor - Can You Output the Program Code? - 01/13/22 09:19 AM

I saw the other post first and answered there:
http://forums.coade.com/ubbthreads/ubbthreads.php?ubb=showflat&Number=76181#Post76181