Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
If a drawing template is used for a part the title block picks up the iproperty of the model's material.
The same drawing template is also used for assemblies. Now the wish is for the title block to show "N/A" for material
How can the Properties - Model / Material iproperty be set to "N/A" when an assembly view has been placed?
Thanks for looking
Andrew
Solved! Go to Solution.
Solved by bradeneuropeArthur. Go to Solution.
I just wrote this few lines of code for you.
Only paste it into an iLogic rule to make it work.
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet oSheet = oDrawDoc.ActiveSheet Dim oView As DrawingView For Each oView In oSheet.DrawingViews If oView.ReferencedDocumentDescriptor.ReferencedDocumentType = kAssemblyDocumentObject Then MessageBox.Show("Is an assembly") Else MessageBox.Show("Is not an assembly") End If Next
It will check your drawing for views of .iam-files. Change the two MessageBox-lines to what you expect to happen in that specific case and trigger the rule with the open document event or whatever you like to .
I hope this will help you!
If you have further questions, please ask
Hi @andrew_canfield,
Can you please provide sample drawings which are linked part and assembly respectively?
Please make sure that files are non confidential one.
Thanks and regards,
Hello Chandra
The mapping is pretty simple, the template is used for parts and assemblies.
No problem for parts, but the template iproperty <material> is looking for a part - can it be swapped when an assembly is placed (or is there an alternative workflow- have two separate templates?)
The idea is for N/A to be displayed when an assembly is placed.
Regards
Andrew
Hi,
do you want to try hard way or easy way?
hard way with code, easy way with difference TitleBlocks (not difference template, just difference title block with easy naming for easy use).
sorry, my clarification are if you edit that title block with hard way, if in 1 file there are many sheet, each sheet have difference base model (assemblys or parts), it cant be only use 1 titleblock, because that titleblock use for all sheet.
better way is create new titleblock for difference base model.
like A0 for Assy and A0 for part, then create sheet format for easy use when new sheet.
My initial thought was a line of iLogic code.
thinking, If this, then replace.
But the part material doesn't exist so there's nothing to replace.
It's trickier than I thought.
are in 1 file there are many sheet and with difference base model? if yes you cant edit or replace that title block attribute.
This idea doesn't seem right but..
if the drawing contains an assembly
then..
Place the text "N/A" (need to format the size & font)
at co-ordinates to suit the paper size/title block.
Else..do nothing
I think I could do most of that!- not sure how to ensure the font is Arial 5mm.
Hi @andrew_canfield,
In any assembly file, Material iProperty is disabled. For more details, refer the following screenshot.
It is clear that, "Material" iProperty is unable for Assembly files.
But it is available for part files. refer the following screenshot of iProperty in part file.
That's why, In drawing file "Material" iProperty is able to link from part file.
Please feel free to contact if there is any queries.
If solves problem, click on "Accept as solution" / give a "Kudo".
Thanks and regards,
Completely different approach!
Place "N/A" in the empty text box - just add it to the drawing:
still need to figure out how to set the font height
added this
#Dim oStyle As TextStyle # oStyle = oGeneralNotes.Item(1).TextStyle #oStyle.FontSize * 3
which doesn't work!!
Making progress 🙂
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet ' Set a reference to the GeneralNotes object Dim oGeneralNotes As GeneralNotes oGeneralNotes = oActiveSheet.DrawingNotes.GeneralNotes Dim oTG As TransientGeometry oTG = ThisApplication.TransientGeometry #Dim oStyle As TextStyle # oStyle = oGeneralNotes.Item(1).TextStyle #oStyle.FontSize * 3 ' Create text with simple string as input. Since this doesn't use ' any text overrides, it will default to the active text style. Dim sText As String sText = "N/A" Dim oGeneralNote As GeneralNote oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(92.3, 1.2), sText)
It's a complete fudge but ...
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the active sheet. Dim oActiveSheet As Sheet oActiveSheet = oDrawDoc.ActiveSheet ' Set a reference to the GeneralNotes object Dim oGeneralNotes As GeneralNotes oGeneralNotes = oActiveSheet.DrawingNotes.GeneralNotes Dim oTG As TransientGeometry oTG = ThisApplication.TransientGeometry ' Create text with simple string as input. Since this doesn't use ' any text overrides, it will default to the active text style. Dim sText As String ' sText = "N/A" ' ' Dim oGeneralNote As GeneralNote ' oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(92.3, 1.2), sText) If ActiveSheet.Size= "A0" Then tx=92.64 ty= 1.37 Else If ActiveSheet.Size= "A1" tx=57.8 ty= 1.37 Else If ActiveSheet.Size= "A2" tx=33.2 ty= 1.37 End If ' tx=92.64 ' ty= 1.37 oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(tx, ty), sText) oGeneralNote.FormattedText = "<StyleOverride FontSize = '0.25'>" & sText & "</StyleOverride>"
Hi,
This can be done without coding:
if help needed please let me know
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Thanks, I think I follow..
could I have a screen shot of:
I'm thinking the drawing take the iproperty from the .iam template?
The iam template takes the iproperty from a part (custom property n/a)
When the parts are deleted aren't the links lost?
Ongoing...
what screenshot do you need.
the links are not links in terms of links.
so they are deleted after part or assembly removal.
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
ScreenShot part:
Screenshot Assembly:
The Assembly uses fix text as <N/A> for Companymaterial
the part used =<material> for Companymaterial
Then copy the property "Companymaterial" into the drawing via the document settings:
Screenshot is in previous post.
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
One slight hitch.
90% of the assemblies have been created, the fix is to add the new CompanyMaterial N/A iproperty (I think)
Regards
Andrew
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Can't find what you're looking for? Ask the community or share your knowledge.