Topic Options
#76162 - 01/06/22 04:06 PM Spec Editor - Can You Output the Program Code?
SaturnV Offline
Member

Registered: 04/25/17
Posts: 85
Loc: Lone Star State
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

Top
#76163 - 01/06/22 10:58 PM Re: Spec Editor - Can You Output the Program Code? [Re: SaturnV]
Vanman Offline
Member

Registered: 02/03/06
Posts: 2884
Loc: JHB South Africa
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 ?
_________________________
Cadworx User

Top
#76164 - 01/07/22 08:35 AM Re: Spec Editor - Can You Output the Program Code? [Re: SaturnV]
Matt.Worland Offline
Member

Registered: 07/18/07
Posts: 638
Loc: Denver, CO
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.
_________________________
matt worland
ECE Design

Top
#76170 - 01/09/22 10:38 PM Re: Spec Editor - Can You Output the Program Code? [Re: SaturnV]
Vanman Offline
Member

Registered: 02/03/06
Posts: 2884
Loc: JHB South Africa
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.
_________________________
Cadworx User

Top
#76171 - 01/10/22 07:04 AM Re: Spec Editor - Can You Output the Program Code? [Re: Vanman]
SaturnV Offline
Member

Registered: 04/25/17
Posts: 85
Loc: Lone Star State
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

Top
#76173 - 01/10/22 09:53 AM Re: Spec Editor - Can You Output the Program Code? [Re: SaturnV]
Matt.Worland Offline
Member

Registered: 07/18/07
Posts: 638
Loc: Denver, CO
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.
_________________________
matt worland
ECE Design

Top
#76175 - 01/10/22 11:21 AM Re: Spec Editor - Can You Output the Program Code? [Re: Matt.Worland]
SaturnV Offline
Member

Registered: 04/25/17
Posts: 85
Loc: Lone Star State
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

Top
#76176 - 01/11/22 10:16 AM Re: Spec Editor - Can You Output the Program Code? [Re: SaturnV]
Matt.Worland Offline
Member

Registered: 07/18/07
Posts: 638
Loc: Denver, CO
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
...
_________________________
matt worland
ECE Design

Top
#76177 - 01/12/22 10:35 AM Re: Spec Editor - Can You Output the Program Code? [Re: Matt.Worland]
SaturnV Offline
Member

Registered: 04/25/17
Posts: 85
Loc: Lone Star State
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

Top
#76182 - 01/13/22 09:19 AM Re: Spec Editor - Can You Output the Program Code? [Re: SaturnV]
Matt.Worland Offline
Member

Registered: 07/18/07
Posts: 638
Loc: Denver, CO
_________________________
matt worland
ECE Design

Top



Moderator:  Dominik Hepp 
Who's Online
0 registered (), 41 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
April
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Forum Stats
12065 Members
14 Forums
16973 Topics
75151 Posts

Max Online: 303 @ 01/28/20 11:58 PM
Top Posters (30 Days)