Hello,
I come back about a linetype problem :
With arx 2016, i created a command to add or modify linetype in a draw.
I used AcDbLinetypeTableRecord with his dashs, shapes (with a textstyle)...
With severals transactions i showed a example (polylines/ Spline /circle) of the new linetype.
For a modification, a regen was necessary.
Everything was fine. But the same code with arx 2017 doesn't work and i don't find a logic reason 😕
- My example works only if spline and circle don't use the new linetype
(examples are based on new polylines, spline, circle add in database and transactions aborted)
- Modification of existant record works... but impossible to regen ! I must save, close and open the drawing to see the modifications ! (while LineType Manager appearence is fine)
Just add a new linetype works again. (that why example works again)
I search in my code, with transactions, linetypetable...
I try to use a layer or not.
With a custom entity to set the linetype in worlddraw()..
To force display with acedUpdateDisplay()...
Every attempts are unsuccessful Something changed with arx 2017 but i don't find it in documentation.
A system variable perhaps ?
Thank you for reading, all suggestions are welcome
Florent
Solved! Go to Solution.
Solved by artc2. Go to Solution.
Solved by artc2. Go to Solution.
You are running into a bug in AutoCAD. On a per-database basis, once a linetype is used for display in AutoCAD, it's data is cached and that cache assumes that the linetype will never be modified during that session of AutoCAD (that's the bug). That's why you must save, close, and reopen the drawing to see the linetype change - because that results in a new database in memory and then the old cached values are ignored and new cache values are created.
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
@artc2 wrote:
It will be fixed in the next release of AutoCAD.
I promise to check it! 🙂
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Is there already a solution to this bug? I have same problem on the linetype, and fixing it is a long process especially if the drawing has multiple tab and viewports plus the link. I thought it was the make of old version autocad.
Tnx,
FYI: Just tested in 2018, and it is fixed.
At least from the user standpoint (load a linetype from a LIN file, make changes to the LIN file, reload the same linetype)
@artc2 - do you think this can be pushed into the last SP for 2017? Many users will skip 2018 and have to wait another year or more for this fix.
Hi
I confirm, this bug is fixed on 2018 🙂
Just use acedUpdateDisplay() or regen to see linetype's modifications on entities.
Regards,
Would it work if you turn off VISRETAIN, (visretain =0) , then load the new linetypes, REGENALL, then turn VISRETAIN back on?
Hello
Maybe this "FYL" French Lisp Routine (from P35) will help you !?
I am often using it when I want that "NON-Continuous" Entities have the right / good Display ...
The "FYL" routine forces all Entities to the "continous" LineType and then rolls back to their original LineType !
Regards, Patrice
;;
;; Suite a une demande de Patrice BRAUD
;;
;; Routine : FYL par P35
;;
;; Mettre les entites de la Selection AutoCAD sur CONTINUOUS (Type de Ligne)
;; et immediatement les remettre sur leur Type de Ligne ORIGINALE
;; AINSI on est SUR d'avoir la BONNE representation
;;
(vl-load-com)
(defun c:FYL (/ doc ent sel sty)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark doc)
(and (ssget (list (cons 0 "LINE,POLYLINE,LWPOLYLINE,ARC,CIRCLE,ELLIPSE,SPLINE,MLINE,REGION,MPOLYGON")))
(progn
(vlax-for ent (setq sel (vla-get-activeselectionset doc))
(setq sty (vla-get-linetype ent))
(vla-put-linetype ent "continuous")
(vla-put-linetype ent sty)
)
(vla-delete sel)
(vla-regen doc acallviewports)
)
)
(vla-endundomark doc)
(princ)
)
Patrice BRAUD