Author Topic: Get info from Excel file  (Read 6746 times)

0 Members and 1 Guest are viewing this topic.

DanB

  • Bull Frog
  • Posts: 367
Re: Get info from Excel file
« Reply #15 on: April 03, 2007, 12:36:35 PM »
Just to clarify I am refering to the "modemacro" variable and the status line additions.

GDF

  • Water Moccasin
  • Posts: 2081
Re: Get info from Excel file
« Reply #16 on: April 03, 2007, 12:41:04 PM »
I think I may want to add a few things of my own to this. However, looking over your code I do not see how you accomplished displaying the OSMODE settings. Is "(ARCH:MODE-OSMODE)" running from another snipet of code you have? Could you please explain what I may be over-looking?

Thanks

Here it is

Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; Modemacro Status Line Function ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;|
0 NONe
1 ENDpoint
2 MIDpoint
4 CENter
8 NODe
16 QUAdrant
32 INTersection
64 INSertion
128 PERpendicular
256 TANgent
512 NEArest
1024 Clears all object snaps
2048 APParent Intersection
4096 EXTension
8192 PARallel
|;
(defun ARCH:MODE-OSMODE  ()
  (setvar "users1"
          (strcat
            "$(if,$(!=,0,$(getvar,osmode)),   Os: [) " "$(if,$(and,0,$(getvar,osmode)),None )"
            "$(if,$(and,1,$(getvar,osmode)),End )" "$(if,$(and,2,$(getvar,osmode)),Mid )"
            "$(if,$(and,4,$(getvar,osmode)),Cen )"))
  (setvar "users2"
          (strcat
            "$(if,$(and,8,$(getvar,osmode)),Nod )" "$(if,$(and,16,$(getvar,osmode)),Qua )"
            "$(if,$(and,32,$(getvar,osmode)),Int )" "$(if,$(and,64,$(getvar,osmode)),Ins )"
            "$(if,$(and,128,$(getvar,osmode)),Per )"))
  (setvar "users3"
          (strcat
            "$(if,$(and,256,$(getvar,osmode)),Tan )" "$(if,$(and,512,$(getvar,osmode)),Nea )"
            "$(if,$(and,2048,$(getvar,osmode)),App )"
            "$(if,$(and,8192,$(getvar,osmode)),Par )" "$(if,$(=,0,$(getvar,osmode)), ,])"))
  (princ))
;;;(setvar "modemacro" (strcat "$(eval,$(getvar,users1))" "$(eval,$(getvar,users2))" "$(eval,$(getvar,users3))"))
[code/]
Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

DanB

  • Bull Frog
  • Posts: 367
Re: Get info from Excel file
« Reply #17 on: April 03, 2007, 02:14:21 PM »
Thank You!