Hallo Freunde.
Das habe ich zum o.A. Thema in der NG autodesk.inventor.customization gefunden:
The logic of library parts has changed in Inventor 7. The previous logic
was flawed because by changing the documents subtype you lost what type of
part it was. For example you didn't know if it was created as a regular
part or a sheet metal part. It also limited standard parts to always being
some type of part document. There was some additional control exposed over
availability of commands in Inventor 7 and that's what the library parts are
using. Using the DisabledCommandTypes property of the Document object you
can specify categories of commands that should not be available for that
document. Library parts set this to disable any types of commands that
could change the document. In addition, there is also a new property set
created in the library part that adds some additional intelligence to the
document that the library takes advantage of.
The macro below gets the active part, checks to see if the standard part
property set exists or not, and if it does it deletes the property sets and
sets the DisabledCommandTypes to allow all commands.
Public Sub MakeLibraryPartStandardPart()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
' Check to make sure this is a standard library part.
Dim oPropSet As PropertySet
On Error Resume Next
Set oPropSet =
oDoc.PropertySets.Item("{B9600981-DEE8-4547-8D7C-E525B3A1727A}")
If Err Then
MsgBox "The active part is not a standard library part."
Exit Sub
Else
' Delete the property set and enable all commands.
oPropSet.Delete
oDoc.DisabledCommandTypes = 0
End If
End Sub
--
Brian Ekins
Developer Technical Services, Autodesk
Discussion Q&A: http://www.autodesk.com/discussion
Könnte vielleicht mal helfen
lg Mathias
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP