cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Add To Workspace - No Config Spec

SOLVED
Highlighted
Emerald I

Add To Workspace - No Config Spec

How do I add objects to a workspace without using a config spec filter?

 

Say I search for objects last modified in a very narrow date range and want to add those exact versions to a workspace.  They may be the latest or they may not be.  Choosing the "Latest" filter doesn't collect the correct versions and the "As Stored" filter isn't listed as a choice.  What is the right way to add the exact versions of the objects returned from a search to a workspace?  Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Add To Workspace - No Config Spec

I think I found the solution.

 

What do you have this preference set to:

Add To Workspace Preference.PNG

We have it set to "DEFAULT" (the OOTB value.)

 

I think temporarily changing this preference to "AS_STORED" is the trick. It preserves the "As Stored" config spec during collection, even when it isn't selectable in the filter.

 

Add To Workspace Filter.png 

View solution in original post

13 REPLIES 13
Highlighted

Re: Add To Workspace - No Config Spec

When I did a search just now for files created between 2 dates, I then checked the ones I wanted and highlighted one with the RMB and selected Add to workspace. The files are collected with the Basic tab. Switch to the Advanced tab and it says they are collected with the As Stored spec.

This is in Windchill 11.0 m030.

 

Highlighted

Re: Add To Workspace - No Config Spec

Don't select just one, select them all.

Highlighted

Re: Add To Workspace - No Config Spec

Selected all, Add to Workspace, switch to Advanced tab. Still shows As Saved.

Highlighted

Re: Add To Workspace - No Config Spec

I think I found the solution.

 

What do you have this preference set to:

Add To Workspace Preference.PNG

We have it set to "DEFAULT" (the OOTB value.)

 

I think temporarily changing this preference to "AS_STORED" is the trick. It preserves the "As Stored" config spec during collection, even when it isn't selectable in the filter.

 

Add To Workspace Filter.png 

View solution in original post

Highlighted

Re: Add To Workspace - No Config Spec

Yes, mine is set to As Stored.

 

It does lead to some confusion because of the way Windchill adds to the workspace versus the way Creo loads files and adds them to the workspace on the fly. Windchill we want it to be As Stored. Creo loads them Latest. We have had some issues with getting the wrong files to be exported to manufacturing when the model was saved after the drawing and the drawing was selected for a Windchill Add to Workspace.

Highlighted

Re: Add To Workspace - No Config Spec

We have the same problem with publishing.  It's set to publish 'As Stored' and this won't match what Creo shows if the model was saved (and checked in) after the drawing.  I have an SQL query I run every now and then for this exact purpose.  It locates drawings where the 'As Stored' model does not match the latest version.  I then make the designers go back and re-save the drawings against the latest version of the model.  (I manually set the drawings back to 'In Work' first so the drawing's revision doesn't have to increment.)  I'm trying to beat into everyone's heads that you have to save the drawing last, every time you change the model.

Highlighted

Re: Add To Workspace - No Config Spec

Hi Tom,

I'm very interested in what you've done.

 

It is possible for you to share your SQL query or at least the guidelines?

 

Thanks in advance

Marco
Highlighted

Re: Add To Workspace - No Config Spec

Here is the SQL query:

-- This query will locate mismatches between drawings models.
-- It looks for drawings whose lastest model does not equal the as-stored version.

SELECT --DISTINCT TOP(60)
	ISNULL(lib.namecontainerInfo,'') + ISNULL(prod.namecontainerInfo,'') AS [Context_1],
	edm.CADName AS [CAD_Name_1],
	FORMAT(ed.modifyStampA2, 'MM/dd/yyyy') AS [Date_1],
	ed.statestate AS [State_1],
	ed.versionIdA2versionInfo AS [Rev_1],
	ed.iterationIdA2iterationInfo AS [Iter_1],
	--ed.branchIditerationInfo As [Branch_1],
	f_edm.CADName AS [CAD_Name_2],
	--f_edm.idA2A2,
	FORMAT(f_ed.modifyStampA2, 'MM/dd/yyyy') AS [Date_2],
	f_ed.statestate AS [State_2],
	f_ed.versionIdA2versionInfo AS [Rev_2],
	f_ed.iterationIdA2iterationInfo AS [Iter_2],
	--f_ed.branchIditerationInfo As [Branch_2],
	g_edm.CADName AS [CAD_Name_3],
	FORMAT(g_ed.modifyStampA2, 'MM/dd/yyyy') AS [Date_3],
	g_ed.statestate AS [State_3],
	g_ed.versionIdA2versionInfo AS [Rev_3],
	g_ed.iterationIdA2iterationInfo AS [Iter_3],
	--g_ed.branchIditerationInfo As [Branch_3],
	wt.fullName AS [Name_3]

	FROM EPMDocumentMaster AS [edm]
	JOIN EPMDocument AS ed
		ON edm.idA2A2 = ed.idA3masterReference
		AND ed.branchIditerationInfo = 
			(
				SELECT max(branchIditerationInfo)
				FROM EPMDocument
                
				WHERE idA3masterReference = edm.idA2A2
					AND edm.idA2A2 = ed.idA3masterReference
					AND edm.docType = 'CADDRAWING'
					AND latestiterationInfo = 1
					AND statecheckoutInfo = 'c/i'
			)  

		JOIN  EPMAsStoredMember AS eas
			ON eas.idA3A5 = ed.idA3C10
       
		JOIN  EPMDocument AS f_ed
			ON f_ed.idA2A2 = eas.idA3B5
          
		JOIN  EPMDocumentMaster AS f_edm
			ON f_edm.idA2A2 = f_ed.idA3masterReference

		JOIN EPMDocument AS g_ed
			ON f_edm.idA2A2 = g_ed.idA3masterReference
			AND g_ed.latestiterationInfo = 1
			AND g_ed.branchIditerationInfo = 
				(
					SELECT max(branchIditerationInfo)
					FROM EPMDocument
                
					WHERE idA3masterReference = f_edm.idA2A2
						AND f_edm.idA2A2 = g_ed.idA3masterReference
						AND latestiterationInfo = 1
						AND statecheckoutInfo = 'c/i'
						--AND statestate = 'RELEASED'
				)

		JOIN  EPMDocumentMaster AS g_edm
			ON g_edm.idA2A2 = g_ed.idA3masterReference

		JOIN WTUser AS wt
			ON wt.idA2A2 = g_ed.idA3B2iterationInfo

		LEFT JOIN WTLibrary AS [lib]
			ON ed.idA3containerReference = lib.idA2A2

		LEFT JOIN PDMLinkProduct AS [prod]
			ON ed.idA3containerReference = prod.idA2A2

WHERE
	edm.docType = 'CADDRAWING'
	AND ed.latestiterationInfo = 1
	AND ed.statestate = 'RELEASED'
	AND ed.statecheckoutInfo = 'c/i'
	AND edm.CADName != f_edm.CADName
	AND f_ed.branchIditerationInfo != g_ed.branchIditerationInfo
	AND LEFT(edm.CADName, (LEN(edm.CADName) - CHARINDEX('.',REVERSE(edm.CADName),1))) = LEFT(f_edm.CADName, (LEN(f_edm.CADName) - CHARINDEX('.',REVERSE(f_edm.CADName),1)))
	--AND ed.versionIdA2versionInfo = g_ed.versionIdA2versionInfo

ORDER BY edm.CADName, f_edm.CADName

I've also attached the SQL query and a spreadsheet I use to parse the results.  Depending on how the filters at the right side of the main page are set, each of the different sections can be generated for each of the users.

 

Highlighted

Re: Add To Workspace - No Config Spec

To be 100% clear, this is comparing models and drawings with the same file names (minus extension).  I am NOT traversing drawing dependencies to find the corresponding model.

Highlighted

Re: Add To Workspace - No Config Spec

Tom,

Does this go across the whole structure of Windchill? I have over 2.5million files in Windchill!

 

Highlighted

Re: Add To Workspace - No Config Spec

Yes, but performance isn't too bad.  I'm no SQL expert but I did try do some tuning.  It used to take several hours to run but now it finishes in about 3 minutes on my production system.  (55 GB database, 1.1 million CAD Docs, and 10.5 million file vault items)  Maybe try running it off hours or on a test system first if concerned.

Highlighted

Re: Add To Workspace - No Config Spec

I am getting command not found on all of the lines from the FROM EPMDocumentMaster AS [edm] to the end.

I am on Oracle 12c with Windchill 11 on Windows Server 2008r2.

 

 

Highlighted

Re: Add To Workspace - No Config Spec

It's for SQL server.  You will have to adjust it for Oracle.

 

The 'AS' is an alias.

https://www.w3schools.com/sql/sql_alias.asp

 

It looks like Oracle doesn't need the 'AS' or the brackets.

https://community.toadworld.com/platforms/oracle/w/wiki/4761.tables-and-column-aliases

Announcements