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: 

Looking for someone to write me some code

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
brendan.henderson
375 Views, 3 Replies

Looking for someone to write me some code

I'm not smart enough to figure this out so I'm hoping someone can write this up for me 🙂

 

Basically I have a few custom iProps in IDW's that I need to delete. I know I can do it manually but it's tiresome on hundreds of drawings.

 

I'm thinking something like :-

 

If Custom iProperty "Not Needed" exists then delete it Else Next

If Custom iProperty "Also Not Needed" exists then delete it Else Next

And so on an so forth.

 

The list of iProps to delet is finite and I am comfortable copy/paste and change text in a macro (or iLogic) to replicate your working code to delete further iProps.

 

Thanks in advance.

Brendan Henderson
CAD Manager


New Blog | Old Blog | Google+ | Twitter


Inventor 2016 PDSU Build 236, Release 2016.2.2, Vault Professional 2016 Update 1, Win 7 64 bit


Please use "Accept as Solution" & give "Kudos" if this response helped you.

3 REPLIES 3
Message 2 of 4

Public Sub Del_Custom_iProp()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oCustomset As PropertySet
    Set oCustomset = oDoc.PropertySets.Item("User Defined Properties")
    
    Dim oProp As Property
    For Each oProp In oCustomset
        If oProp.Name = "Not Needed" Or oProp.Name = "Also Not Needed" Then
            oProp.Delete
        End If
    Next
            
End Sub

 

Message 3 of 4

Thank you 

Brendan Henderson
CAD Manager


New Blog | Old Blog | Google+ | Twitter


Inventor 2016 PDSU Build 236, Release 2016.2.2, Vault Professional 2016 Update 1, Win 7 64 bit


Please use "Accept as Solution" & give "Kudos" if this response helped you.

Message 4 of 4

please can anyone write a code for me, for this please, anyone, if i don't write it within a month i will fail in my test

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

Post to forums  

Autodesk Design & Make Report