simple ilogic to difference between titles

simple ilogic to difference between titles

Anonymous
Not applicable
598 Views
3 Replies
Message 1 of 4

simple ilogic to difference between titles

Anonymous
Not applicable

Hi All,

 

Been struggling getting this to work:  we have two types of drawing.  one starts with L30, S89, C20 ETC for standard drawing parts and the other starts with 123-4567, 590-0101 for Purchase parts. 

I am able to difference the two by using that firstletter as a string that RevCOde is = 65 (based on what I red from this site, ASCII character code for capital A) (not sure if this is the best way but it works) , but there are also two types of drawing file that I want to do for description

 

Title 1: without comma then description goes to description

Title 1: with comma, the second portion of comma goes to subject which works fine.

 

everything works fine if I ran it with say L30-1234 TITLE 1, TITLE 2 but if doesn't work with L30-1234 TITLE 1 its still running the second command.  I believe the problem lies in the If, ENDif and AND but I cant quite pinpoint it.  Thanks for any help!

 

 

If Firstletter < RevCode Then
iProperties.Value("Project", "Description") = description
docfile.ComponentDefinition.BOMStructure = 51973 'BOMStructureEnum.kPurchasedBOMStructure
iProperties.Value("Summary", "Subject") = "LIBRARY PART"
End If

'drawing items
If Firstletter >= RevCode Then
iProperties.Value("Project", "Description") = description
iProperties.Value("Summary", "Subject") = ""
End If
If (Firstletter >= RevCode) And (FileName Like "*,*") iProperties.Value("Project", "Description") = commadescription iProperties.Value("Summary", "Subject") = Subject
End If

 

 

 

Accepted solutions (1)
599 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Accepted solution

Would this work better?

If Firstletter < RevCode Then
	iProperties.Value("Project", "Description") = description
	docfile.ComponentDefinition.BOMStructure = 51973 'BOMStructureEnum.kPurchasedBOMStructure
	iProperties.Value("Summary", "Subject") = "LIBRARY PART"
End If

'drawing items
If Firstletter >= RevCode Then
	If (FileName Like "*,*")
		iProperties.Value("Project", "Description") = commadescription
		iProperties.Value("Summary", "Subject") = Subject
	Else
		iProperties.Value("Project", "Description") = description
		iProperties.Value("Summary", "Subject") = ""
	End If
End If
Message 3 of 4

Anonymous
Not applicable

Thank you so much for that fast reply, I been scratching my head since last night. I didn't know how to put and if inside and if as you can tell. 

0 Likes
Message 4 of 4

Anonymous
Not applicable

Happy to help.  Glad it works.  Smiley Happy

0 Likes