• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

create a boolean attribute

  • Thread starter Thread starter Shark79
  • Start date Start date

Shark79

Guest
from a bit of time stó trying to solve a problem.
I would have the need to create an attribute whose value is true or false.

In reality I should make sure to create n boolean attributes connected to a block and then a last attribute that with a formula you count how many boolean attributes are "true".

Are you talking about science fiction or can you do it?

Thank you.[emoji4] sent by my sm-n910f using tapatalk
 
from a bit of time stó trying to solve a problem.
I would have the need to create an attribute whose value is true or false.

In reality I should make sure to create n boolean attributes connected to a block and then a last attribute that with a formula you count how many boolean attributes are "true".

Are you talking about science fiction or can you do it?

Thank you.[emoji4] sent by my sm-n910f using tapatalk
No, it should be science...
look at the attached design, if that's what you mean (remember the aggcampodated command after the changes).

the values of the first 3 attributes are added in the fourth.

for a step-by-step guide see how much I wrote in 2006 in: http://www.domenicoieva.com/risposte.htmand look for the phrase: "calculates with the values of attributes"
View attachment somma_attributi.dwg
 
No, it should be science...
look at the attached design, if that's what you mean (remember the aggcampodated command after the changes).

the values of the first 3 attributes are added in the fourth.

for a step-by-step guide see how much I wrote in 2006 in: http://www.domenicoieva.com/risposte.htmand look for the phrase: "calculates with the values of attributes"
View attachment 46724
Thanks, I managed to play the game.

Sorry, but I have to take advantage of it.

I would be interested in having Boolean values, the user who will compile these attributes should be able to choose between "connected" and "unconnected".

the total value will count me as many times "connected".

Thank you for helping me again.
 
... the user who will fill out these attributes should be able to choose between "connected" and "unconnected".

the total value will count me as many times "connected".

Thank you for helping me again.
You can't do that.
autocad provides diesel language to manage data from data fields, but functions are limited (mathematic operators, if, comparison operators, string manipulation).

I had an idea that I now put you out, I do not do it to fill your head with strange notions, but with the hope of stimulating ideas to some genius of the mathematics who attends these pages and maybe can give you a decisive answer to the question.

Diesel can count how many letters there are in a string.
Let us imagine that "connected" returns 8 and "unconnected" (I added a character) 13 (a first number).

exists the way to determine in a number (a sum) how many times is the number 13?

8+8+13+8 = 37, in 37 there is once (you can not sum the 8 and get 37).

Surely with equations you can solve the problem but, do it with only mathematical operators and comparison in a single expression or expressions nested in multiple levels (this allows diesel :-( ) is not easy.
 
if in the field field that reports the sum eliminates + (the field becomes 101) you get a number always to three digits that you can treat as binary
 
if in the field field that reports the sum eliminates + (the field becomes 101) you get a number always to three digits that you can treat as binary
Good idea, beautiful and elegant!
only that our friend wants that there are strings "connected" and "unconnected" ... and anyway, rethinking, if in the field there is a diesel expression inside it can not be used as values the values of the attributes... sigh :-(
Hi.
 
I'll throw it there, I'm probably just stepping in. .

if you assign 1 to "connected" and 0 to unconnected, you will have the sum of those connected. If you could get the total sum of the addends, regardless of whether they are 1 or 0 (with a loop count maybe), the difference between n° total of the elements and n° total of the connected will give the unconnected.
 
no tense leg, quiet:-)

what you say is what happens with the block attached to the second post (show the number of the connected).
you could also do as you say but it seemed to me to understand that shark79 wanted to be able to write for extended the two strings and not 0 or 1.
 
I'll throw it there, I'm probably just stepping in. .

if you assign 1 to "connected" and 0 to unconnected, you will have the sum of those connected. If you could get the total sum of the addends, regardless of whether they are 1 or 0 (with a loop count maybe), the difference between n° total of the elements and n° total of the connected will give the unconnected.
I had already thought of 0 and 1. That's enough for me.

but there is no control over what the operator inserts.
for example could insert 2 or 3 or fat...

the challenge would be to enter a check on the inserted value that is not different from 0 or 1.
 
Have you tried with dynamic blocks, lookup parameter?
I attached an example file to you, the table I created with data extraction, you can export it to excel rather than insert it into the dwg, and process your data.
 

Attachments

Have you tried with dynamic blocks, lookup parameter?
I attached an example file to you, the table I created with data extraction, you can export it to excel rather than insert it into the dwg, and process your data.
Great idea thanks.

is there any way to show graphically when connected or when not connected, maybe even with a triangle that turns the tip 180° based on the parameter?

You're great!
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top