looking to add color changing to this macro

venturini.anthony
Advocate
Advocate

looking to add color changing to this macro

venturini.anthony
Advocate
Advocate

I'm looking to add another option to this macro. currently this macro reads the transparency of the corresponding excel file. I want to change layer colors too. how would i add that to this existing macro?

 

 

^C^C^P(LayersFromFile (strcat "FADE-" (cadr (assoc (progn (initget "Site Grading Drainage Utility Landscape lIghting erOsion Vehicle") (getkword "What plan are you working in? [Site/Grading/Drainage/Utility/Landscape/lIghting/erOsion/Vehicle]: ")) '(("Site" "Site") ("Grading" "Grade") ("Drainage" "Drain") ("Utility" "Util") ("Landscape" "Land") ("lIghting" "Light") ("erOsion" "Soil") ("Vehicle" "Vehicle")))) ".xlsx") "transparency")

 

 

venturinianthony_0-1666968242181.png

 

0 Likes
Reply
219 Views
3 Replies
Replies (3)

ВeekeeCZ
Consultant
Consultant

That has to be done in the LayersFromFile routine which you did not post it.

0 Likes

venturini.anthony
Advocate
Advocate

THERE IS NO ROUTINE FOR THAT. I JUST LOOKS FOR THE FILE, READS THE COLUM STATED, AND CHANES THE LAYER BASED ON THE NAME. IF I WERE TO CHANGE THE "TRANSPARENCY" TO "COLOR" IN THE MACRO IT WOULD READ THE RIGHT COLUMN BUT I WANT TO CHANGE BOTH THE TRANSPARENCLY AND COLOR

0 Likes

paullimapa
Mentor
Mentor

@ВeekeeCZ is correct, LayersFromFile is a lisp function with two arguments:

#1 = name of excel file

#2 = column name

For example:

(LayersFromFile (strcat "FADE-Grade" ".xlsx") "transparency")

So if you want to add another column that changes like the Color value, then you'll need to change the LayersFromFile.lsp code to accommodate


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes