Hello again,
I'm still struggleing on the interface.
The current obstacle is: MText.
Since the Delphi side of the interface doesn't know how to handle multilinetexts I'm supposed to give it out as simple text.
So far so good. MTexts and Texts have a lot in common. so the toughest point is to get rid of the whole controle information.
I should admit, I'm using a function of someone else, which i don't quite understand to do that.
My problem now is, that I don't get the texts out the way they appear on screen.
example:
In the drawing appears: -2,95
The text line in BricsCADs object inspector says: \A1;{\fSwis721 BT|b0|i0|c0|p34;\C7;-2,95}
What I get is: 1;{\fSwis721 BT|b0|i0|c0|p34;\C7;-295}
what i'd Need would be: -295 (since I have to strip the commas off all text)
now the functions I use are:
(defun mtx
(mtxtVal
/ mcnt mstpt msrf mtstStr mtxtVal mtxtLines
) )
mcnt 1
)
)
))
mstpt 1 mcnt 1
msrf "\\P"
)
mstpt(+ mcnt 2)
mcnt(+ mcnt 1)
)
)
)
)
)
; -
(defun stripIt
(sTxt
/ sa sCntr sChk
) )
)
)
)
)
)
;;; -
(defun getMtxData
(/ bigStr bigLst entPt entVal a entNorm
) ;THEN
)
)
;ELSE
)
)
;--- Get rid of the font control data inside brackets {} ?!?!?!?
;;; this doesn't seem to work properly
(setq bigLst
(mtx
(stripSigns
(stripIt bigStr
))) entVal ""
)
)
(fileWrite
(strcat "TEXT,"(cdr(assoc 8 entity
))","(rtos(car entPt
)2 4)","(rtos(cadr entPt
)2 4)","(rtos(caddr entPt
)2 4)"," entVal
","(rtos(cdr(assoc 40 entity
))2 4)","(vl-string-trim "r"(angtos(cdr(assoc 50 entity
))3 4))",1,"(rtos(car entNorm
)2 4)","(rtos(cadr entNorm
)2 4)","(rtos(caddr entNorm
)2 4))) ;;; 0 . entity type
;;; 1 . Layer
;;; 2;3;4 . insertion point
;;; 5 . Text
;;; 6 . text hight
;;; 7 . Rotation
;;; 8 . scaling
;;; 9;10;11 . normal/extrusion vector
)
(defun getTxtData
(/ entPt entNorm
) )
(fileWrite
(strcat "TEXT,"(cdr(assoc 8 entity
))","(rtos(car entPt
)2 4)","(rtos(cadr entPt
)2 4)","(rtos(caddr entPt
)2 4)","(stripSigns
(cdr(assoc 1 entity
)))","(rtos(cdr(assoc 40 entity
))2 4)","(vl-string-right-trim "r"(angtos(cdr(assoc 50 entity
))3 4))","(rtos(cdr(assoc 41 entity
))2 4)","(rtos(car entNorm
)2 4)","(rtos(cadr entNorm
)2 4)","(rtos(caddr entNorm
)2 4)));;; Ausgabeliste an die Datei anhängen ;;; 0 . entity type
;;; 1 . Layer
;;; 2;3;4 . insertion point
;;; 5 . Text
;;; 6 . text hight
;;; 7 . Rotation
;;; 8 . scaling
;;; 9;10;11 . normal/extrusion vector
) ;;; ende getTxtData
Now the way I see it is, that mtx is supposed to remove the control information , which it doesn't do. Can anyone explain to me, what's going wrong? Or maybe even Show me a working unction?
As always thanks in advance!