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: 

how to delete value in iproperties using vba

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
akosi
994 Views, 3 Replies

how to delete value in iproperties using vba

 

 

while in assembly, i would like to select a subpart and be able to clear or delete the value of ex description without opening the part file.

 

i can delete properties in custom prop but i cant do it in description.

ive use design tracking properties but to no avail..Smiley Sad

 

 

3 REPLIES 3
Message 2 of 4
ekinsb
in reply to: akosi

It sounds like you've already got the code that gets the document containing the iProperties.  The function below will clear the description property, given a document.

 

Public Sub ClearDescription(Doc As Inventor.Document)
    Dim propSet As PropertySet
    Set propSet = Doc.PropertySets.Item("Design Tracking Properties")
    
    Dim descProp As Property
    Set descProp = propSet.Item("Description")
    
    descProp.value = ""
End Sub

 

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 4
ADNpati
in reply to: akosi

Sub ClearDescription()

Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveDocument

oAsmDoc.PropertySets.item(3).item(14).Value = ""
    
End Sub

 You can see the full details of part or sembly in watch window using VBA.

 

Mechanical Engineer
Inventor Applications Engineer

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, Some KUDOS -

-------------------------------------------------------------------------------------
Message 4 of 4
akosi
in reply to: ekinsb

>>>>>>>>>>ekinsb & adnpati

 

thanks for answering...really appreciate it..

i didnt try the  descProp.value = ""

i keep doing the delete value like im doing in custom prop...

anyway..thanks a lot guys

 

 

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

Post to forums  

Autodesk Design & Make Report