Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

To all API experts! A Special Request.

13 REPLIES 13
Reply
Message 1 of 14
jeff_jordan
1178 Views, 13 Replies

To all API experts! A Special Request.

I have run into a limitation with the communication between Vault and Inventor and the way Vault categorizes content center files.  Autodesk has acknowledged the issue, but doesn't have a solution yet.  The issue starts in Inventor and that is where I think a little bit of customization can be done.  However, I am not familiar with the Inventor API.

 

Here is a summary of the issue:

  1. Content center files possess a Boolean iProperty called “Is Content”=True
  2. This property is used to separate content center files in vault and add them to the content center file category.
  3. When adding a content center part to an assembly, you have two choices: “As Standard” or “As Custom”.
  4. If you choose “As Custom”, the file is no longer be a content center file, but the “Is Content” property stays True.
  5. We need the property to switch to False if “As Custom” is selected, this way the custom content center file can be properly categorized in vault.

 

I feel this would be a simple statement that queues off the "As Custom" or "As Standard" radio button in the content center dialog box with a simple IF>THEN>ELSE statement, such as: 

 

IF "As Custom" is selected

THEN iProperties.Value("Is Content") = False

ELSE iProperties.Value("Is Content") = True

-or-

IF "As Standard" is selected

THEN iProperties.Value("Is Content") = True

ELSE iProperties.Value("Is Content") = False

-or-

IF "As Custom" is selected

THEN iProperties.Value("Is Content") = False

IF "As Standard" is selected

THEN iProperties.Value("Is Content") = True

 

I just don’t know the language that needs to be used for this.  If the "Is Content" property can’t be messed with, then even creating an new property that is true/false or 1/0 depending on the “As Custom”/”As Standard” selection you made would work great!  Bottom line is I need an automatic way to tell between standard content center files and custom content center files.

 

If you have a free moment and would like to save the day, I would be EXTREMELY grateful!

Autodesk Product Design Suite Ultimate 2015 (Inventor 2015 Pro SP1, Vault 2015 Pro Update 1)
MacbookPro OSx 10.9, Boot Camp
Windows 7, 64-bit
Intel Core i7 2.6 GHz
16GB
SSDs
NVIDIA GeForce GT 750M with 2GB of GDDR5
13 REPLIES 13
Message 2 of 14
pauldoubet
in reply to: jeff_jordan

I am not sure where you feel a problem lies in the following description.

 

"Here is a summary of the issue:

  1. Content center files possess a Boolean iProperty called “Is Content”=True
  2. This property is used to separate content center files in vault and add them to the content center file category.
  3. When adding a content center part to an assembly, you have two choices: “As Standard” or “As Custom”.
  4. If you choose “As Custom”, the file is no longer be a content center file, but the “Is Content” property stays True.
  5. We need the property to switch to False if “As Custom” is selected, this way the custom content center file can be properly categorized in vault."

I am using CC files with Vault and I am not sure why you would want to change the "Is Content"=True for 'As Custom' Parts. Your statement in item #4 is not true, the 'As Custom' part is still a CC part and can be edited with the 'Replace from CC' or 'Change Size' option. If you set the "Is Content"=False I am sure that the connection to CC is no longer valid which would prevent editing the part with the above commands.

I see no problems with CC files being properly categorized in Vault. Actually the files are properly categorized by the placement of 'As Custom' files in your directory structure prior to checking them into Vault in my opinion. Am I missing something unique to your use of Inventor, CC files, & Vault? I have done extensive customization to CC files and I don't understand your need to change the way this works 'Out of the Box'.

 

Hope this helps, Paul

Message 3 of 14
jeff_jordan
in reply to: pauldoubet

Thank you for your follow-up.

 

For the case where you place a CC part "As Custom" so that you can modify it (example: hole through a screw), the file is no longer a typical CC part, and must flow through our mechanical engineering lifecycle (revision control, etc...).  This is how we use CC, which may be different than your use.  Since the "Is Content" property stays true, the file gets assigned to the wrong category and thus wrong lifecycle.  It would be simple to manually change categories, but I've set it up so that only the administrator can change the state of a released CC part (I don't want to relax this).  Other users are allowed to change categories, but you can't change categories of a released file.  I hope this clarifies things.

Why would you place a CC part as custom if you aren't going to modify it?  Is replacing it or resizing it even possible without loosing your modifications?

 

Basically, I'm trying to give our users the ability to take a CC part, modify it, save it as a custom CC part, and have it travel through the normal mechanical engineering lifecycle and be controlled accordingly.  If I can't somehow flag CC parts created "As Custom", the files will be locked away from the users.

 

I've created a temporary work around by adding a custom iProperty flag to the CC category rule.  The user must remember to populate this custom property before they check the file into vault or they will loose control of it and have to ask an administrator to help.

Autodesk Product Design Suite Ultimate 2015 (Inventor 2015 Pro SP1, Vault 2015 Pro Update 1)
MacbookPro OSx 10.9, Boot Camp
Windows 7, 64-bit
Intel Core i7 2.6 GHz
16GB
SSDs
NVIDIA GeForce GT 750M with 2GB of GDDR5
Message 4 of 14

Hi jeff_jordan,

 

Q: "Why would you place a CC part as custom if you aren't going to modify it?"

A: It's common to do so with structural steel members, because they are placed at different lengths.

 

Would it make sense to derive the the original CC part and make the modifications there? Meaning the purchased screw generated from CC would be placed as a standard CC part so that it could be used as purchased if needed, but then you would derive it into a standard IPT template and add the required machining. The result would be the custom machined version would reference the standard CC version, and not have any CC flags.

 

Just a thought, it might not work for your setup though.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

 

 

Message 5 of 14
pauldoubet
in reply to: jeff_jordan

I think from the bits of information I am reading that you may need to do further investigation into CC parts and how they behave in 'Library' and 'As Custom' locations. And as they say 'Location' is everything.

 

"Why would you place a CC part as custom if you aren't going to modify it?  Is replacing it or resizing it even possible without loosing your modifications?"

 

Replacing and resizing are definitely possible without losing your modifications. CC files placed 'As Custom' are normally located in a directory that is part of your Vault project 'Workspace' which allows them to be edited. Only files placed as 'Library' parts are located in the 'Content Center' folder in Vault which prevents the user from editing them; however edits to these parts are possible if they need revisions or updates to the 'Family Template' file or the CC table, etc.

 

"If I can't somehow flag CC parts created "As Custom", the files will be locked away from the users."

 

The location of the 'As Custom' files allows you to modify them, they will not be locked away from the users unless you desire to do that with a combination of settings in your project file and/or Vault. And if you want to reuse existing designs with the 'Copy Design' capabilities of Vault you would not want the CC files locked away from the users. All of this is possible without changing the 'Is Content'=True property. We do this on a daily basis with both custom CC library files and the 'Out of the box' CC files such as fasteners, fittings, etc.

 

Hope this helps, Paul

Message 6 of 14
jeff_jordan
in reply to: pauldoubet

Paul,

 

Are you using lifecycles with property compliance and released children requirements?

 

I completely understand what you are saying, but this is not a library vs. workspace issue.  It is a lifecycle issue.  Consider this...

 

  1. We have a flexible release lifecycle that all Inventor files are categorized into.  This lifecycle has strict property compliance rules for built in Inventor iProperties as well as custom iProperties.  Therefore, in order for a file to be released, it must meet the property compliance.  Also, the children of that file must be released.
  2. The CC files must be categorized separately from normal Inventor files for two separate reasons a) CC parts don't have the same custom iProperties that must be compliant therefore they can't be released b) CC parts are usually children to assemblies, therefore the assembly can't be released.
  3. The CC category is assigned a special lifecycle that automatically releases the CC files upon load into vault.  This allows the parents to be released.
  4. The only way to separate CC files from normal files is by the Inventor "Is Content" property.  (We do not use or enforce a file naming convention and we treat part numbers separate from file names, which is another long conversation, but we can't filter in these ways either)
  5. Like I've said before, "As Custom" and "As Standard" look the same as far as their properties go.  Therefore, it is impossible to AUTOMATICALLY filter them from each other so that the "As Custom" files will enter the normal flexible release process and the "As Standard" will enter the CC lifecycle and be released.  This is what I was talking about when I said the files would be locked away from the user.  They enter the CC lifecycle and are automatically released with only the administrator able to change the state.
  6. "As Custom" files are saved as a separate file apart from the CC library. These types of files have modifications (hole through a screw, length of a beam with hole pattern, etc... that are documented in a drawing.  In order for these drawings to conform to our standard and have the title block and notes properly filled out, they must have the custom iProperties of our templates (I've written and external rule to add these properties to files that weren't built from our templates).
  7. It is important for the automatic filter at initial load, otherwise, the "As Custom" parts will be treated "As Standard".
  8. A temporary "workaround" is to filter the two types of CC parts with another property that is manually toggled depending on what the file type is BEFORE it is loaded in vault.  This puts the responsibility on the user and there is room for error.  If a user forgets to fill out the iProperty before loading into vault, the file is categorized an "As Standard" CC part.
  9. We have an "Altered Item Part Number" property that the user fills out before adding to vault.  The CC files do not have this property.  Therefore, I created a filter in the CC category along the lines of "Altered Item Part Number" is empty.
  10. This works like a charm AS LONG AS the user remembers to fill out the iProperties before load.
  11. If "As Custom" would yield "Is Content = False" then this would AUTOMATICALLY distinguish between the two.
  12. Honestly, this could be any property as long as it is AUTOMATIC.  "Is content" already exists and has been written about to filter content center files.
  13. For those like you who don't want to see the change, perhaps you can modify your category "Is Content" rule in vault to "not empty" rather than true.  This way if a False is read, it won't disrupt they way you are already working.

I hope I explained everything clearly...I'm in a bit of a rush and don't have time to proofread!

Autodesk Product Design Suite Ultimate 2015 (Inventor 2015 Pro SP1, Vault 2015 Pro Update 1)
MacbookPro OSx 10.9, Boot Camp
Windows 7, 64-bit
Intel Core i7 2.6 GHz
16GB
SSDs
NVIDIA GeForce GT 750M with 2GB of GDDR5
Message 7 of 14

Curtis,

 

"A: It's common to do so with structural steel members, because they are placed at different lengths."

Ah...because you can document the length in a parts list as a length column and you won't need a drawing for it.  However, if you needed to add a hole pattern in such piece, you would need and drawing and would want it to follow your standard.  Perhaps, there may be times you want to place "As Custom" but have it treated as CC, but there are also times you'll place "As Custom" and want it to be treated as a normal design file.  Perhaps another iProperty altogether is needed?

 

"Would it make sense to derive the the original CC part and make the modifications there? Meaning the purchased screw generated from CC would be placed as a standard CC part so that it could be used as purchased if needed, but then you would derive it into a standard IPT template and add the required machining. The result would be the custom machined version would reference the standard CC version, and not have any CC flags."

 

Deriving a part fromt the CC is an excellent idea...especially if the CC part already exists in Vault.  However, if the CC part doesn't exist, you would have to first add it to an assembly, upload to vault, delete it from the assembly, get it from vault, and then derive from your workspace.  Many clicks compared to the "As Custom" toggle.  I agree though, this would make a clean part and it would even have the custom iProperties from the templates!  I think there is a better way though.

 

 

 

Autodesk Product Design Suite Ultimate 2015 (Inventor 2015 Pro SP1, Vault 2015 Pro Update 1)
MacbookPro OSx 10.9, Boot Camp
Windows 7, 64-bit
Intel Core i7 2.6 GHz
16GB
SSDs
NVIDIA GeForce GT 750M with 2GB of GDDR5
Message 8 of 14
Mark_Wigan
in reply to: jeff_jordan

if you open a part that came from cc then run this macro this should make it behave as a normal part...

 

Public Sub CCNormal()

Dim oDoc As PartDocument

Set oDoc = ThisApplication.ActiveDocument

 

' Enable all commands and set the subtype to a standard part.

oDoc.DisabledCommandTypes = 0

oDoc.SubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}"

 

' Optionally clean up other CC related properties.

On Error Resume Next

oDoc.PropertySets.Item("Content Library Component Properties").Delete

Dim dtPropSet As PropertySet

Set dtPropSet = oDoc.PropertySets.Item("Design Tracking Properties")

dtPropSet.Item("Catalog Web Link").Value = ""

End Sub

'Public Sub CCNormB() ' 'Dim oDoc As PartDocument ' 'Set oDoc = ThisApplication.ActiveDocument ' ' ' ' '' Enable all commands and set the subtype to a standard part. ' 'oDoc.DisabledCommandTypes = 0 ' 'oDoc.SubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}" ' ' ' '' Optionally clean up other CC related properties. ' 'On Error Resume Next ' 'oDoc.PropertySets.Item("Content Library Component Properties").Delete ' 'Dim DTPropSet As PropertySet ' 'Set DTPropSet = oDoc.PropertySets.Item("Design Tracking Properties") ' 'DTPropSet.Item("Catalog Web Link").Value = "" ' 'End Sub

best regards,
- Mark

(Kudo or Tag if helpful - in case it also helps others)

PDSU 2020 Windows 10, 64bit.

Message 9 of 14
jeff_jordan
in reply to: Mark_Wigan

Mark,

 

Thank you so much for taking the time to write this macro.  I haven't tried running it because any macro that requires the user to run it would be no different than asking the user to add a value to an iproperty (this can be set as the push of a button in a form).

 

I would like something that is triggered off of the CC placement menu "As Custom" or "As Standard" radio button.  This would make distinguishing between the two automatic.

 

Perhaps this isn't possible.  It sounds simple.

Autodesk Product Design Suite Ultimate 2015 (Inventor 2015 Pro SP1, Vault 2015 Pro Update 1)
MacbookPro OSx 10.9, Boot Camp
Windows 7, 64-bit
Intel Core i7 2.6 GHz
16GB
SSDs
NVIDIA GeForce GT 750M with 2GB of GDDR5
Message 10 of 14
Mark_Wigan
in reply to: jeff_jordan

hi, i am not sure about integrating i have not tried it.

 

maybe you can just make your own button that fires this ccnormal macro and then automatically invokes the 'check in to vault' command or something similar.

 

maybe you can add the macro to your part template (that you tell inventor to use as a cc template) so that when the user hits save, the macro is fired in the background. the user would never know about it.

 

i would do some testing to make sure there are no issues first though.

best regards,
- Mark

(Kudo or Tag if helpful - in case it also helps others)

PDSU 2020 Windows 10, 64bit.

Message 11 of 14

Dear, Jeff,

May I ask what do you mean under "CC category"? AFAIK there are only four standard (out-of-box) file categories in the Vault: Base, Office, Standard and Design (free translation from Russian).

 

Let assume you mean some custom file category .... which has its own custom categorizing rule, right?

"The only way to separate CC files from normal files is by the Inventor "Is Content" property."

I'm trying to reproduce your scenario, and I don't  see the possibility to use "Is Content" property in categorising rule* section. Here "Initial Release Date" is followed by "Latest Release Revision"...no "Is Content" property available. So what is a plan to use the property for file categorizing?

 

* Vault Profesional 2012 upd1

Tools->Administration->Vault settings

Behaviours->Rules (Categories)

File Rules -> New -> OK -> Property

 

Message 12 of 14
shastu
in reply to: Mark_Wigan

Hey Mark,  This is what I think I was looking for.  I have parts that were copied from a content center part and even though they are no longer a content center, they still act like one including the blue icon in an assembly.  I tried this macro and afterword it still has a blue icon and some of the other code that I am using still sees it as a content center part because the oSS.Item(1).IsContentMember is still equal to True.  Is there something else I need to do?

Message 13 of 14
shastu
in reply to: Mark_Wigan

I also stepped through your code on both a content center part and one that was copied from a content center part and both the oDoc.DisabledCommandTypes = 0 and odoc.SubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}" before it got to that code so it wasn't changing any values.

Message 14 of 14
shastu
in reply to: Mark_Wigan

Never mind.  I found a way.

 

Public Sub CCNormal()

Dim oDoc As PartDocument

Set oDoc = ThisApplication.ActiveDocument

Debug.Print oDoc.ComponentDefinition.IsContentMember
      
        Call oDoc.PropertySets.Item(5).Delete
       
Debug.Print oDoc.ComponentDefinition.IsContentMember
   
End Sub

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report