I have been working with BricsCAD for many years (since V9 and before with LTExtender), I have extracted some annotations and conditions from my Lisp.
I apologize if they are not explained well, I will do so if requested. I hope it's useful.
#BCFlg = BricsCADFLag
(or #BCFlg (command "_.CONVERT" "_HATCH" or "_All" ...)) > not exits
(or cal (if #BCFlg (load "cadcal") (arxload "GEOMCAL")))
(if #BCFlg
(vl-cmdf "_.EXPLODE" SelSet) ; > better
(progn (setvar "QAFLAGS" 1) (vl-cmdf "_.EXPLODE" SelSet "") (setvar "QAFLAGS" 0)); to explode more objects
)
(if (and (null #BCFlg) (> (atof (getvar "ACADVER")) 23.0))
(command "_CLASSICINSERT")
(progn (initdia 1) (command "_.INSERT"))
)
(or #BCFlg (vl-cmdf "_.MLEADER" ... different))
(vl-cmdf "_.ZOOM" "_OBJECT" ...) only in new versions - AutoCAD >19.1 OK
(vla-put-GraphicsWinLayoutBackgrndColor AcDisp (if #BCFlg 255 16777215)) ; in Brics bianco = 255 - il nero è 0
(if #BCFlg (vl-cmdf "_WCLOSEALL" ...) (vl-cmdf "_CLOSEALL" ...))
"_.WBLOCK" (if #BCFlg (strcat FulNam "." FilTyp) FulNam) > BricsCAD need extension
(defun C:ALE_Utl_Redo ( )
(if #BCFlg (command "_redo")(command "_mredo" "1"))
(princ)
)
(if #BCFlg (command "_.PRINT") (progn (initdia) (command "_.PLOT")))
> BricsCAD use only English names
"ISO pagina intera A0 (841 x 1189 mm)" "ISO full bleed A0 (841.00 x 1189.00 MM)"
(if #BCFlg "Print As PDF.pc3" "DWG To PDF.pc3")
(command "_.ZOOM" (strcat "10" (if #BCFlg "XP" "X_P")))
(if #BCFlg
(command "_.POLYGON" "6" pt1 "_S" ...different)
(command "_.POLYGON" "6" pt1 "_C" ...different)
)
(if ;AutoCAD in W7-64 (getvar "PLATFORM") "Microsoft Windows NT Version 6.1 (x64)"
(and; PROCESSOR_ARCHITECTURE restituisce "AMD64" anche su processore Intel ma restituisce "x86" su Bricscad in W7 64bit
(setq PrcArc (getenv "PROCESSOR_ARCHITECTURE"))
(< 1 (strlen PrcArc))
(or (eq "64" (substr PrcArc (1- (strlen PrcArc)))) #BCFlg)
); da migliorare perchè in Bricscad su 32 bit non funziona
(setq SldLib "\\slidelib_x64.exe ")
(setq SldLib "\\slidelib.exe ")
)
#BCFlg > (getenv "DefaultFormatForSave") > nil
; Con BricsCAD (Ita/Eng) la scrittura di valori numerici in Excel (italiano) avviene con la sostituzione del punto
; decimale in virgola al contrario di AutoCAD (Ita/Eng) che lascia il punto
;
(defun MsX_AutoPutNumericValue2 (CelObj ImpVal DecPrc)
(cond
( (null ImpVal) )
( (= ImpVal "") (msxm-Clear CelObj) )
( #BCFlg (msxp-put-Value2 CelObj ImpVal) )
( (= 'STR (type ImpVal)) (msxp-put-Value2 CelObj (vl-string-translate "." "," ImpVal)) )
( T (msxp-put-Value2 CelObj (vl-string-translate "." "," (rtos ImpVal 2 DecPrc))) )
)
(vlax-release-object CelObj)
)
; Function: ALE_Dim_SetChildStyle
;
; Version 1.01 - 10/10/2010
; Description:
; Workaround for Bricscad to use Dimstyles child (0,3)
;
; Examples: (ALE_Dim_SetChildStyle "dimlinear") (ALE_Dim_SetChildStyle "dimangular")
;
;
(defun ALE_Dim_SetChildStyle (DimTyp / CurDSt BasNam)
(if #BCFlg
(progn
(setq
CurDSt (vla-get-Name (vla-get-activedimstyle *AcAcDwg*))
BasNam (vl-string-right-trim "$03" CurDSt)
)
(cond
( (= DimTyp "dimdiameter")
(cond ; $3 Stile per diametri
( (wcmatch CurDSt "*$3") )
( (tblsearch "DIMSTYLE" (strcat BasNam "$3"))
(command "_.DIMSTYLE" "_RESTORE" (strcat BasNam "$3"))
)
( (and (wcmatch CurDSt "*$#") (tblsearch "DIMSTYLE" BasNam))
(command "_.DIMSTYLE" "_RESTORE" BasNam)
)
)
)
( (wcmatch DimTyp "dimlinear,dimcontinue,dimaligned,dimbaseline")
(cond ; $0 Stile lineare ISO-25 (tipi allineati e ruotati)
( (wcmatch CurDSt "*$0") )
( (tblsearch "DIMSTYLE" (strcat BasNam "$0"))
(command "_.DIMSTYLE" "_RESTORE" (strcat BasNam "$0"))
)
( (and (wcmatch CurDSt "*$#") (tblsearch "DIMSTYLE" BasNam))
(command "_.DIMSTYLE" "_RESTORE" BasNam)
)
)
)
( (and (wcmatch CurDSt "*$#") (tblsearch "DIMSTYLE" BasNam))
(command "_.DIMSTYLE" "_RESTORE" BasNam)
)
)
)
)
(princ)
)