ilogic to count features

ilogic to count features

jletcher
Advisor Advisor
4,433 Views
22 Replies
Message 1 of 23

ilogic to count features

jletcher
Advisor
Advisor

I have 8 holes each a single feature is there a way for ilogic to count the active ones even if they change to inactive without a ten mile long code?

 

 

Hole 1  true

Hole 2 true

Hole 3 true

Hole 4 False

Hole 5 False

Hole 6 False

Hole 7 true

Hole 8 true

 

Count should be 5

 

If I change to

 

Hole 1  true

Hole 2 true

Hole 3 true

Hole 4 False

Hole 5 true

Hole 6 False

Hole 7 true

Hole 8 true

 

Count should be 6

 

 

Hole 1  False

Hole 2 False

Hole 3 False

Hole 4 False

Hole 5 true

Hole 6 False

Hole 7 true

Hole 8 true

 

Count should be 3

 

Can this be done with short code?

 

Many Thanks

 

0 Likes
Accepted solutions (1)
4,434 Views
22 Replies
Replies (22)
Message 21 of 23

Anonymous
Not applicable

Hmm.. The error was on line 64, which was the 'For Each' line (I actually recopied the exact same code in and it worked fine, which is why I think something went wrong when doing the initial copy / paste)

 

You don't need an End If when using the IF statement on one line - I like to do my simpler IF statements like this because it makes for much cleaner code.

 

Cheers,

Tom

0 Likes
Message 22 of 23

kmiller
Collaborator
Collaborator

Sounds good,

Probably my mistake then.

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
0 Likes
Message 23 of 23

kmiller
Collaborator
Collaborator
Sounds good, Probably my mistake then. KATIE MILLER | CAD Coordinator ARCHITECTURAL DIVISION | COLD SPRING GRANITE 17482 Granite West Road | Cold Spring, MN 56320-4578 P: 320.685.3621 | 😧 320.685.4730 | F: 320.685.5052 http://www.coldspringgranite.com | kmiller@coldspringgranite.com Follow us on Twitter | Facebook This communication is intended only for the recipient(s) named above, may be confidential and/or legally privileged, and must be treated as such in accordance with state and federal laws. If you are not the intended recipient, you are hereby notified that any use of this communication, or any of its contents, is prohibited. If you have received this communication in error, please return it to the sender and delete the message from your computer system.
-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
0 Likes