Check Internal ID

Is there a way to find out the internal ID of a part? I'm thinking of using it to make sure my students are not copying each others parts.

Thanks, Jim

Reply to
Jim
Loading thread data ...

Right click on a feature, select properties, it will list who created.

Reply to
remy martin

Only indirectly.

One would think an assembly could be made with student A's part. Then force the assembly to open with student B's part where A's once was. SW should complain that the internal ID is not the same if the two files are different but have the same filename.

You can also access author, data created and date changed information in a macro. The chances a particular feature was created at the same time by two different students are pretty slim.

Reply to
TOP

Useing RMB-Feature-Properties pulls up who created the feature, sketch...

This would be a good check.

-Blair

Jim wrote:

Reply to
Blair Sutton

I tried writing a macro to do this. Even in the API, there was no direct way. The long way around I found was to attempt swapping identically named copies of parts in a drawing or assembly and see what happens.

As others stated, checking the feature properties is probably the easiest route.

Reply to
That70sTick

There are five properties of every feature:

CreatedBy DateCreated DateModified Description Name

Here is a little something that will go through a part document and list all these parameters for every feature. Note that a feature will not show modified time different from create time unless the dimension is changed through the property manager. I don't know whether you can get a dimension as a feature with this method.

' ****************************************************************************** ' C:\DOCUME~1\KELLNERP\LOCALS~1\Temp\swx332\Macro1.swb - macro recorded on 07/13/05 by kellnerp ' ****************************************************************************** Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object Dim swFeat As SldWorks.Feature

Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

Set Feature = Part.FirstFeature

Do While Not Feature Is Nothing

Debug.Print "Name = ", Feature.Name Debug.Print "Description = ", Feature.Description Debug.Print "Created By = ", Feature.CreatedBy Debug.Print "Created Date = ", Feature.DateCreated Debug.Print "Modified Date = ", Feature.DateModified Set Feature = Feature.GetNextFeature() Loop

End Sub

Reply to
TOP

Thank you for all your help. I ended up using this macro to fill in a listbox.

Jim

Reply to
Jim

Just a little FYI, the internal ID is not the author. It is a time/date encoded stamp that tells SolidWorks if it is the exact same as another part named the same.

And no, there is no way to read the internal ID except for the example given above with the student.

Reply to
SWX-VAR-JP

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.