Hi,
I'm searching for a rule that add's text to the .idw if the Title block contains *Material "S235 JR" and has **Color "Brut".
*Material
This is already 'taken' from the part's propertie thats in the drawing.
**Color
This is chosen by the user in the Form.
If the combination of these two is correct the text "FREE FROM OXYDE" should appear on the titleblock on a specific location.
Anyone that can help?
Thanks!
How to display:
The easiest way is to create custom iProperty in drawing document and in the TitleBlock definition create TextBox with reference to this iProperty. You can easily specify text format and position. By default the iProperty value is empty
I don't know what does it mean "chosen by the user in the Form". You need to store this value somewhere. For example in iProperty or parameter.
In this case you can create simple macro where you compare two values and if they are equal, you set the iProperty value
Dim part As PartDocument = ThisDrawing.ModelDocument
Dim materialMatch As Boolean = part.ActiveMaterial.Name = "S235 JR"
Dim colorMatch As Boolean = CheckIfColorMatch() ' Pseudocode. Must be implemented
If materialMatch And colorMatch Then
iProperties.Value("Custom", "TitleBlockNote") = "FREE FROM OXYDE"
Else
iProperties.Value("Custom", "TitleBlockNote") = ""
End If
Hi, thanks a lot!
What I mean is that the color is chosen within a form and not coming from the part itself.
It's a custom iPropertie linked to a paramter list in the .idw template.
So what I need is that the rule checks what the text is inside the iPropertie 'color'.
Can't find what you're looking for? Ask the community or share your knowledge.