ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LineType Autocad 2017

31 REPLIES 31
SOLVED
Reply
Message 1 of 32
florentENTFL
2963 Views, 31 Replies

LineType Autocad 2017

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

 

31 REPLIES 31
Message 21 of 32
artc2
in reply to: florentENTFL

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.

Message 22 of 32

Hi Art!
Is there method to "clear" this cache?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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
Expert Elite Member

Message 23 of 32
artc2
in reply to: Alexander.Rivilis

No, there is no way to do anything to this cache.
Message 24 of 32

So we can hope for bugfix (HotFix, ServicePack, etc.) ?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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
Expert Elite Member

Message 25 of 32
artc2
in reply to: Alexander.Rivilis

It will be fixed in the next release of AutoCAD.
Message 26 of 32
Alexander.Rivilis
in reply to: artc2


@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
Expert Elite Member

Message 27 of 32

Haaaa big thank to you ! So i made the right choise coming back on 2016 version. And i promise to check it too 😉 @veli_vaisanen : Thank you for resurrecting my old topic 🙂 Florent
Message 28 of 32
owitzki
in reply to: florentENTFL

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,

Message 29 of 32
rkmcswain
in reply to: florentENTFL

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.

R.K. McSwain     | CADpanacea | on twitter
Message 30 of 32
florentENTFL
in reply to: rkmcswain

Hi

 

I confirm, this bug is fixed on 2018 🙂

 

Just use acedUpdateDisplay() or regen to see linetype's modifications on entities.

 

Regards,

Message 31 of 32
dodgese2
in reply to: florentENTFL

Would it work if you turn off VISRETAIN, (visretain =0) , then load the new linetypes, REGENALL, then turn VISRETAIN back on?

Message 32 of 32
braudpat
in reply to: dodgese2

 

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 ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost