Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding an item to iProperties to fill in a titleblock

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
459 Views, 4 Replies

Adding an item to iProperties to fill in a titleblock

Hi, I have just managed to create my own title block and have an area within for material. I always use the iProperties to populate the titleblock but there isnt a field for material? Is there a way to add a field so it does what i need?

 

I have a screenshot to try and help explain what I mean (maybe!)

 

editdefinition2.jpg

 

 

 

 

4 REPLIES 4
Message 2 of 5
cbenner
in reply to: Anonymous

Is that screen shot from the drawing iproperties?  Material would most likely be pulled from the part itself.

 

matl.JPG

 

To use this on your titleblock you would set the field to Properties - Model and then Material.  It will pick up that value from whatever model you put into that drawing.

 

mat2.JPG

 

Hope this helps.

Message 3 of 5
Anonymous
in reply to: Anonymous

Yeah thats the screenshot from the drawing iProperties. Is the one you posted from the part iProperties? Ill give it a go. Would it also work if I give the part a material from the top right selection dropdown box?

 

Thanks for your help so far!

 

Pete

Message 4 of 5
Anonymous
in reply to: Anonymous

Hey Peter,

 

I too use the material in the title block.

 

I named all my sheet metal rules to specify material and gauge/thickness, so I needed a rule  in my drawing template to use this info. So what I did (with the help of others) was create a custom iProperty called MaterialInfo. I have a rule in each sheet metal and part template, so that once I create the part, assign the material parameters and save, the rule automatically creates this custom iProterty. this can be edited manually also in the custom tab of the iProperties menu. I then make sure my drawing template has this in the titleblock so that once a base view is dropped the iproperty is populated.

 

here is the rule imbedded into the part files:

Dim oDoc = ThisApplication.ActiveDocument
If oDoc.DocumentType = kPartDocumentObject Then 'Confirm part
	If oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then 'Confirm Sheetmetal
		Try: Stock = iProperties.Value("Custom", "SheetMetalRule") 
			Catch: MsgBox("SheetMetalRule iProperty Doest not exist")
		End Try
	Else 'Confirm Standard
		Stock = iProperties.Material
	End If
	Try: iProperties.Value("Custom", "MaterialInfo") = Stock
		Catch: MsgBox("MaterialInfo iProperty Doest not exist")
	End Try
Else 
	MsgBox("File is not a part")
End If

 iproperty7.png

 

iproperty7.png

 

iproperty8.png

 

Good Luck!

 

 

Message 5 of 5
Anonymous
in reply to: Anonymous

Thanks to ChrisB I have got it working.

 

Sean, i'm not sure where I would paste that code but it seems there is more than one way to accomplish the task. I work in the education sector so would really have the need for a huge range of material properties, but from a personal point of view, thanks for your help - im sure it will come in handy one day!

 

Pete

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

Post to forums  

Autodesk Design & Make Report