- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm working on a piece of iLogic code that supresses components in an assembly base on selections made to an excel sheet. To do this I'm using Case statements. The problem is that the display name of the components has the part number in it and I want to be able to use this code on multiple assemblies with different parts in them. So I want to be able to suppress component based on if their name contains a string. Here is a sample of my code.
Select Case DRIVE
Case "0"
Component.IsActive("226343:1-DRIVE 460V")=0
Component.IsActive("236662:1-DRIVE 380V")=0
Component.IsActive("289132:1-DRIVE 575V")=0
Case "1"
Component.IsActive("226343:1-DRIVE 460V")=1
Component.IsActive("236662:1-DRIVE 380V")=0
Component.IsActive("289132:1-DRIVE 575V")=0
Case "2"
Component.IsActive("226343:1-DRIVE 460V")=0
Component.IsActive("236662:1-DRIVE 380V")=1
Component.IsActive("289132:1-DRIVE 575V")=0
Case "3"
Component.IsActive("226343:1-DRIVE 460V")=0
Component.IsActive("236662:1-DRIVE 380V")=0
Component.IsActive("289132:1-DRIVE 575V")=1
End Select
So basically I want to remove the part numbers from what I've got shown and suppress or unsuppress based on the 460V, 380V, and 575V string. Does anyone know how to do this?
Andrew In’t Veld
Designer / CAD Administrator
Solved! Go to Solution.