Message 1 of 2
Ilogic If part exists then use different mate offset value

Not applicable
07-10-2019
11:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im trying to figure out the code in a rule for searching for a part that contains the name "ZAP" and if the part is in there the following mate of the next inserted part offset value is to be increased by .079. If the part cannot be found then forgo the .079 increase.
Any help please?
I am able to get this to detect the part true or false
Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oComps As ComponentOccurrences = oDoc.ComponentDefinition.Occurrences Dim PartExists As Boolean = False For Each oComp As ComponentOccurrence In oComps If oComp.Name.Contains("ZAP") Then PartExists = True Exit For End If Next
But i cant get if partexists = true then
(constrain with this dimension)
else if part exisit = false then
(constrain with other dimension)