kojacek Opublikowano 17 Listopada Zgłoś Opublikowano 17 Listopada LISP który działa normalnie w AC, nie działa w ZWCAD 2026. Zauważyłem że dla wymiaru właściwość DimTxtDirection nie ma wartości. To błąd czy umyślne zaniechanie?
RobS Opublikowano 17 Listopada Zgłoś Opublikowano 17 Listopada Zapytałem producenta o to czemu ten parametr jest pusty. Dam znać jak dostanę odpowiedź.
kojacek Opublikowano 17 Listopada Autor Zgłoś Opublikowano 17 Listopada Dzięki... Dla tego wymiaru (już z ciekawości przejrzałem) właściwości bez wartości jest więcej: AltSubUnitsFactor = AltSubUnitsSuffix = DimConstrDesc = DimConstrValue = DimTxtDirection = SubUnitsFactor = SubUnitsSuffix =
RobS Opublikowano 21 Listopada Zgłoś Opublikowano 21 Listopada Producent doradził, żeby parametr DimTxtDirection odczytać używając w skrypcie wyrażenia: (cdr (assoc 53 (entget (car (entsel))))) Dla pozostałych parametrów które wypisałeś analogicznie trzeba użyć innych kodów DXF: 100 Subclass marker (AcDbDimension) 280 Version number: 0 = 2010 2 Name of the block that contains the entities that make up the dimension picture 10 Definition point (in WCS) DXF: X value; APP: 3D point 20, 30 DXF: Y and Z values of definition point (in WCS) 11 Middle point of dimension text (in OCS) DXF: X value; APP: 3D point 21, 31 DXF: Y and Z values of middle point of dimension text (in OCS) 70 Dimension type: Values 0-6 are integer values that represent the dimension type. Values 32, 64, and 128 are bit values, which are added to the integer values (value 32 is always set in R13 and later releases) 0 = Rotated, horizontal, or vertical 1 = Aligned 2 = Angular 3 = Diameter 4 = Radius 5 = Angular 3-point 6 = Ordinate 32 = Indicates that the block reference (group code 2) is referenced by this dimension only 64 = Ordinate type. This is a bit value (bit 7) used only with integer value 6. If set, ordinate is X-type; if not set, ordinate is Y-type 128 = This is a bit value (bit 😎 added to the other group 70 values if the dimension text has been positioned at a user-defined location rather than at the default location 71 Attachment point: 1 = Top left 2 = Top center 3 = Top right 4 = Middle left 5 = Middle center 6 = Middle right 7 = Bottom left 8 = Bottom center 9 = Bottom right 72 Dimension text line-spacing style (optional): 1 (or missing) = At least (taller characters will override) 2 = Exact (taller characters will not override) 41 Dimension text-line spacing factor (optional): Percentage of default (3-on-5) line spacing to be applied. Valid values range from 0.25 to 4.00 42 Actual measurement (optional; read-only value) 1 Dimension text explicitly entered by the user. Optional; default is the measurement. If null or “<>”, the dimension measurement is drawn as the text, if ““ (one blank space), the text is suppressed. Anything else is drawn as the text 53 The optional group code 53 is the rotation angle of the dimension text away from its default orientation (the direction of the dimension line) (optional) 51 All dimension types have an optional 51 group code, which indicates the horizontal direction for the dimension entity. The dimension entity determines the orientation of dimension text and lines for horizontal, vertical, and rotated linear dimensions This group value is the negative of the angle between the OCS X axis and the UCS X axis. It is always in the XY plane of the OCS 210 Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector 220, 230 DXF: Y and Z values of extrusion direction (optional) 3 Dimension style name
kojacek Opublikowano Niedziela o 17:43 Autor Zgłoś Opublikowano Niedziela o 17:43 (edytowane) Obawiam się że coś się nie zgadza... Na obrazie widać dwa wymiary (wyraźnie) różniące się położeniem i orientacją tekstu wymiarowego. Różnice są widoczne także w wartości właściwości DimTxtDirection - są to wartości logiczne odpowiednio :vlax-false ("normalny") i :vlax-true ("odwrócony"). Dla tychże wymiarów (różniących się przecież), kod 53 DXF jest liczbą rzeczywistą i wynosi jednakowo 0.0 (Przykład w AutoCAD, bo w ZwCAD właściwość DimTxtDirection nie ma wartości - co jest w końcu tematem wątku) Edytowane Niedziela o 17:47 przez kojacek
RobS Opublikowano Poniedziałek o 09:20 Zgłoś Opublikowano Poniedziałek o 09:20 Żeby ustawić DimTxtDirection użyj wyrażenia: (command "_dimoverride" "_DimTxtDirection" "ON" "" (car (entsel)) "")
kojacek Opublikowano Poniedziałek o 13:32 Autor Zgłoś Opublikowano Poniedziałek o 13:32 4 godziny temu, RobS napisał: Żeby ustawić DimTxtDirection użyj wyrażenia: (command "_dimoverride" "_DimTxtDirection" "ON" "" (car (entsel)) "") Ok, to znam. Jednak to nie załatwia sprawy. Potrzeba jest nieco inna: najpierw odczytać, a potem zmienić (lub nie). Stąd było pytanie o stan właściwości DimTxtDirection.
RobS Opublikowano Poniedziałek o 14:21 Zgłoś Opublikowano Poniedziałek o 14:21 Czy możesz wkleić fragment kodu który teraz realizuje to zadanie?
kojacek Opublikowano Poniedziałek o 14:57 Autor Zgłoś Opublikowano Poniedziałek o 14:57 32 minuty temu, RobS napisał: Czy możesz wkleić fragment kodu który teraz realizuje to zadanie? (vla-put-DimTxtDirection Obj (Val-Invert (vla-get-DimTxtDirection Obj))) gdzie Val-Invert to funkcja która "odwraca" wartość (np 0 na 1 / false na true / nil na T itd (i odwrotnie))
RobS Opublikowano Wtorek o 07:13 Zgłoś Opublikowano Wtorek o 07:13 Propozycja od producenta. Kod automatycznie steruje właściwością tekstu wymiaru DimTxtDirection, korzystając ze stanu przechowanego w XData. (defun c:foo() (setq en (car (entsel))) (setq xd (cdr (assoc -3 (entget en (list "ACAD"))))) (if (not xd) (command "_dimoverride" "_DimTxtDirection" "ON" "" en "") (progn (setq data (member (cons 1070 294) (cdar xd))) (if (not data) (command "_dimoverride" "_DimTxtDirection" "ON" "" en "") (progn (setq isOn (cdadr data)) (if (= isOn 1) (command "_dimoverride" "_DimTxtDirection" "OFF" "" en "") (command "_dimoverride" "_DimTxtDirection" "ON" "" en "") ) ) ) ) ) )
kojacek Opublikowano Wtorek o 07:58 Autor Zgłoś Opublikowano Wtorek o 07:58 (edytowane) 45 minut temu, RobS napisał: Propozycja od producenta. Kod automatycznie steruje właściwością tekstu wymiaru DimTxtDirection, korzystając ze stanu przechowanego w XData. (defun c:foo() (setq en (car (entsel))) (setq xd (cdr (assoc -3 (entget en (list "ACAD"))))) (if (not xd) (command "_dimoverride" "_DimTxtDirection" "ON" "" en "") (progn (setq data (member (cons 1070 294) (cdar xd))) (if (not data) (command "_dimoverride" "_DimTxtDirection" "ON" "" en "") (progn (setq isOn (cdadr data)) (if (= isOn 1) (command "_dimoverride" "_DimTxtDirection" "OFF" "" en "") (command "_dimoverride" "_DimTxtDirection" "ON" "" en "") ) ) ) ) ) ) Ok. Sprawdzę jak to działa - czyli podsumowując ten stan jest zapisywany w XData (podobnie jak inne nadpisania zmiennych wymiaru), a nie jak początkowo było mówione o kodzie 53 "zwykłych" danych DXF. Jak już jesteśmy przy ZwCAD-zie... Jak przypisać właściwość Annotative do tekstu/wymiaru/kreskowania/itp. pomijając ręczną zmianę we Właściwościach? W AutoCAD polecenie _CHPROP ma opcję Annotative, jednak jak słyszę ZwCAD tego nie ma. Edytowane Wtorek o 08:03 przez kojacek
RobS Opublikowano Środa o 07:26 Zgłoś Opublikowano Środa o 07:26 Niestety nie da się tego zrobić poleceniem _CHPROP i nie ma innego sposobu. Sprawa jest zarejestrowana przez producenta do poprawek.
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się