The CUI file

Further to my earlier question in the Bricscad support, my colleague has written cui file to drive the LISP as follows;

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>


 



We put this file in the c:\kinecad\...

One of our LSP is listed below which used to create an arrow in a drawing. We have created a number of LSP to make our draftsmen work easier.

; Kine Fall Arrow AutoLISP
; created by LK 2009.03.12
;
; v1.00 lastsaved 2009.03.12
; start main program
;
(defun C:karrowfall()

   (setq basescale (getvar "DIMSCALE"))
   (setvar "CECOLOR" "0")

   (command "line" (getpoint "Beginning of Section Mark") (getpoint "End of Section Mark") "" )
   (setq etname (entlast))
   (setq etlist (entget etname))
   (setq gp1x (nth 1 (assoc 10 etlist)))
   (setq gp1y (nth 2 (assoc 10 etlist)))
   (setq gp2x (nth 1 (assoc 11 etlist)))
   (setq gp2y (nth 2 (assoc 11 etlist)))
   (setq gp1 (strcat (rtos gp1x 2) "," (rtos gp1y)))
   (setq gp2 (strcat (rtos gp2x 2) "," (rtos gp2y)))
   (entdel etname)

;  get angle

   (setq dx1 (- gp2x gp1x))
   (setq dy1 (- gp2y gp1y))
   (setq dline (sqrt (+ (expt dx1 2) (expt dy1 2) ) ))

   (setq lang1 (atan dy1 dx1))
   (if (> lang1 0) (setq lang1 (* (/ lang1 pi) 180)) (setq lang1 (+ (* (/ lang1 pi) 180) 360) ))

;  draw lines and arrows

   (setvar "CECOLOR" "1")

   (setq secmarks (ssadd))

   (setq donut (* 1 basescale))
   (setq txtsize (* 3.5 basescale))
   (setq txtdist (* 2.5 basescale))
   (setq arrld (* 6 basescale))
   (setq arrdx (* arrld (cos (/ pi 3))))
   (setq arrdy (* arrld (sin (/ pi 3))))

   (setq pt1x gp1x)
   (setq pt1y gp1y)
   (setq pt1 (strcat (rtos pt1x 2) "," (rtos pt1y)))
   (command "CIRCLE" pt1 donut)
   (setq secmarks (ssadd (entlast) secmarks))

   (setq pt2x (+ pt1x dline))
   (setq pt2y pt1y)
   (setq pt2 (strcat (rtos pt2x 2) "," (rtos pt2y)))
   (command "line" pt1 pt2 "" )  
   (setq secmarks (ssadd (entlast) secmarks))

   (setq pt3x (- pt2x arrdx))
   (setq pt3y (- pt2y arrdy))
   (setq pt3 (strcat (rtos pt3x 2) "," (rtos pt3y)))

   (setq pt4x (- pt2x arrdx))
   (setq pt4y (+ pt2y arrdy))
   (setq pt4 (strcat (rtos pt4x 2) "," (rtos pt4y)))

   (setvar "CECOLOR" "3")

   (command "line" pt3 pt2 "" )  
   (setq secmarks (ssadd (entlast) secmarks))

   (command "line" pt4 pt2 "" )  
   (setq secmarks (ssadd (entlast) secmarks))

   (setq pt5x (+ pt1x (/ dline 2)))
   (setq pt5y (+ pt1y txtdist))
   (setq pt5 (strcat (rtos pt5x 2) "," (rtos pt5y)))
   (command "text" "justify" "mc" pt5 txtsize 0 "FALL" " ")
   (setq secmarks (ssadd (entlast) secmarks))

;  rotate entities

   (command "rotate" secmarks "" pt1 (rtos lang1 2))
   (setvar "CECOLOR" "BYLAYER")

)

; end of program

The above cui and LSP files work and perform very well in windows XP but it does not work in Windows 7 either 32 and 64 bits.

Any input from the forum is appreciated.

Best regards,
Sugia Mulyana.


Comments

  • Things you should check and compare between XP and W7:
    1. The search path (we have already discussed this on the Meeting Point).
    2. The file on_doc_load.lsp.
    To determine if the Lisp works OK in W7 you can drag-and-drop the file onto your Bricscad window and type the command: karrowfal.

    Two remarks:
    When you say 'does not work' what exactly happens?
    There is no CUI information in your post.
  • Typo: karrowfal should be karrowfall.
  • Dear Roy, thank you for your reply.
    The action you adviced in the Meeting Point have been implemented in the BicsCad setting, i.e. the folder where the CUI file exist have been included in the Support File Search Path list. And than we load the Partial CUI File from customised window, the toolbars of does not appear in the screen.
    We have tried to append some of the toolbars in the customised window under the menugroup KINE and we unhide them, we found empty toolbar in the BricsCad window.
    I am sorry that I have mistyped the "karrowfall" in the forum but it is correct in the file naming.

    I seen in this forum that I did not attached the CUI file, and here under is the listing.

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>


     
       
         
             
         
       
     



    Any other input is appreciated.
    Thanks, Merry Christmas if you are Christian.

  • Dear Roy.
    Attached are two files to show the difference between Windows XP and Windows 7 Home Premium of 64 bit. I can not get the same display as I used Windows XP.
    I hope you can help me on this.
    Thanks & regards.

    Display on Windows 7 of 64 bit.docDisplay on Windows XP Service Pack 3.doc

  • Dear Roy.
    I found to solve the problem. Just copy the CUI file generated by Windows XP into the computer using Windows 7 of 64 bit.
    Thank you for recent communications.
    Best regards,
    Sugia Mulyana.

This discussion has been closed.