If/then statement help

If/then statement help

Anonymous
Not applicable
3,438 Views
8 Replies
Message 1 of 9

If/then statement help

Anonymous
Not applicable

Greetings,

 

I am trying to develop a panel schedule that will calculate NEC load factors. this means that i will need to run conditional caluclations based on the load type. the only way i can think of automation this is with if statemnts which have no functionallity in fields. I am trying to find a way to do this now with other means within autocad. I would prefer to not have data links to excel files as it reduces the speed while working within the draing. any help on a code being able to take a cell of an autocad table and determine a multiplitive factor based on a letter input (L=1.25, R=1, LM=1.25, K=0.65) then multiply that value to another cell value input (wattage on a circuit). then return the solution in a third cell.

 

Thank you for your help. 

0 Likes
Accepted solutions (1)
3,439 Views
8 Replies
Replies (8)
Message 2 of 9

jarredmonday
Collaborator
Collaborator

My experience, I've never been able to make an autocad TABLE to work like a SPREADSHEET, like excel. Simple functions like Sums and equations obviously work, but definitely not any IF statements.

 

On the other hand...maybe using attributes and fields to read one another and arranging them into a table layout may work?

 

Good luck and if someone has came up with a method without a link to excel, I would love know.

Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
0 Likes
Message 3 of 9

ahmed.abdelmotey
Advocate
Advocate
0 Likes
Message 4 of 9

ahmed.abdelmotey
Advocate
Advocate
this diesel expression was posted by leemac cadtutor but i can't find the thread

=$(if,D12*E12/1000000,1[,0]C12*D12*E12/1000000)
*by lee mac
Ahmed Abd-Elmotey
Landscape Architect & beginner lisp programmer
0 Likes
Message 5 of 9

Libbya
Mentor
Mentor
Accepted solution

Fields do not play with diesel.  

0 Likes
Message 6 of 9

ahmed.abdelmotey
Advocate
Advocate
but why not ?
Ahmed Abd-Elmotey
Landscape Architect & beginner lisp programmer
0 Likes
Message 7 of 9

Libbya
Mentor
Mentor

Why not?  You'd have to ask the folks who programmed AutoCAD...  Diesel does not recognize field values in if/then statements.  I look forward to being shown otherwise as there are a couple of applications where I have been frustrated by that fact.

0 Likes
Message 8 of 9

Anonymous
Not applicable

Unfortinatly this is correct. I seem to only be able to do it with global variables and it will not read any input as a value only text contents. Autofield is an addon that adds "if" functionallity to autocad but is costly and not a vaiable solution for me. thanks for the assistance, back to the drawing board.

0 Likes
Message 9 of 9

Libbya
Mentor
Mentor

I may still be able to satisfy your desired functionality without using if/then.  Can you post up an example file to play with?

0 Likes