Need help with iLogic rule for empty prompted entry (idw Field Text)

Need help with iLogic rule for empty prompted entry (idw Field Text)

Anonymous
Not applicable
986 Views
5 Replies
Message 1 of 6

Need help with iLogic rule for empty prompted entry (idw Field Text)

Anonymous
Not applicable

Hello All,

 

I was wondering if someone can check the iLogic rule I attached below.  What I'm trying to do is for this iLogic to alert me with a message box that the prompted fields (idw Field Text) in my title block is empty and needed to be filled out.  The 2 prompts are "DRAWN BY" and "CREATION TIME".  I ran this rule be it kept directing to iProperties "DESIGNER" field instead, I do not want this rule to look into iProperties at all.  I also attached some snip shots of the prompted fields (idw Field Text) that I was referring to.  I am a beginner iLogic user, so if you can please help me fix this rule and let me know what I did wrong it would be much appreciated.

Dim doc = ThisDoc.Document

Dim oDrawnBy As String = doc.PropertySets.Item("Design Tracking Properties").Item("Designer").Value 
Dim oCreationDate As String = doc.PropertySets.Item("Design Tracking Properties").Item("Creation Time").Value 

If oDesigner = "" Then 
	
	oDesig = InputBox("Designer prompted entry", "DRAWN BY", "Default Entry")
	doc.PropertySets.Item("Design Tracking Properties").Item("Designer").Value= oDesig
		
End If
If oCreationDate < "01/01/1970" Then
	
	odate = InputBox("Creation Time prompted entry", "DRAWN BY", "01/01/2018")
	doc.PropertySets.Item("Design Tracking Properties").Item("Creation Time").Value = odate
	
End If

 

0 Likes
987 Views
5 Replies
Replies (5)
Message 2 of 6

philip1009
Advisor
Advisor

What field do you want the "DRAWN BY" to go into?

 

Dim oDrawnBy As String = doc.PropertySets.Item("Design Tracking Properties").Item("Designer").Value

That line is doing what you don't want.  Find out which field you want to use and change the above line.  Then you'll have to edit your Title Block to change the iProperty the Title block will pull from.

0 Likes
Message 3 of 6

Anonymous
Not applicable

I would like the "DRAWN BY" to go into the field text prompted field.  I rename "Designer" to "DRAWN BY" but I'm getting an error message in rule.  What should I do for this rule to look into the sheet field text prompt entry only.  I attached the rule below after I made the corrections...

 

Dim doc = ThisDoc.Document

Dim oDrawnBy As String = doc.PropertySets.Item("Design Tracking Properties").Item("DRAWN BY").Value 
Dim oCreationDate As String = doc.PropertySets.Item("Design Tracking Properties").Item("CREATION DATE").Value 

If oDrawnBy = "" Then 
	
	oDesig = InputBox("Designer prompted entry", "DRAWN BY", "Default Entry")
	doc.PropertySets.Item("Design Tracking Properties").Item("DRAWN BY").Value= oDesig
		
End If
If oCreationDate = "" Then
	
	odate = InputBox("Creation Time prompted entry", "CREATION DATE", "01/01/2018")
	doc.PropertySets.Item("Design Tracking Properties").Item("CREATION DATE").Value = odate
	
End If
0 Likes
Message 4 of 6

Sergio.D.Suárez
Mentor
Mentor

You can not change the name of the "Designer" property in the iproperties, in the "project" tab of the drawing file. This is a property by default of the file. You can use this field and put the name "DRAWN BY" in the text box. On the label you can write "DRAWN BY" and assign the "Designer" property so that it is copied on all the sheets of the drawing file. If you do not like the name "Designer" appearing in the iproperties, when uploading, you should create a custom value in "custom" name it as "DRAWN BY" and load it from the custom tab


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 5 of 6

tdant
Collaborator
Collaborator

Prompted text entries in the title block are controlled by text boxes that are contained in the title block definition sketch, not iProperties. If you want to change the value of the title block text box, you should access it via the definition sketch.

0 Likes
Message 6 of 6

rhasell
Advisor
Advisor

Hi

I would advise that you investigate using Custom iProperties.

- Finding and creating iLogic code will be much easier

- You can easily drive the respective entries with forms.

- You wont get bugged every time you insert your title block, personally there is nothing more irritating than having to answer a list of questions and prompts before I can start work.

- The Custom iProperties can now pull information from the host models. (Once again with code, which is easier to create)

 

So what I am trying to say is, forget using prompted text entries in your template, it is going to be more trouble than its worth. Custom iProperties are, among other things, designed specifically for this purpose.

 

Regards

 

Reg
2026.1
0 Likes