Linetype - How to catch errors

Linetype - How to catch errors

Anonymous
Not applicable
594 Views
2 Replies
Message 1 of 3

Linetype - How to catch errors

Anonymous
Not applicable

When I load the linetype file

 

'' Load the Center Linetype
acCurDb.LoadLineTypeFile(sLineTypeName, gstrc_SFR_LineType_FullFileName)

 

How do I detect if the linetype is in the Linetype file? How do I do my error checking here in the ACAD way? 

 

Currently I just search the acad.lin or sfr.lin Text File to see if the LineType Exists. This works.

 

But I was curious how would you check the linetype file via the Acad API,

to see if the linetype definition name exists in the file? 

 

 

 

 

 

 

0 Likes
595 Views
2 Replies
Replies (2)
Message 2 of 3

dgorsman
Consultant
Consultant

Try/catch, resorting to the CONTINUOUS linetype hard-coded into AutoCAD in the event an error is thrown.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 3 of 3

Anonymous
Not applicable

or, with reference to the example from the developers guide, open the linetypetable and check whether linetypetable.has(linetype). in addition to reverting to any particular linetype - which may be perfectly fine - you can check for alternative linetypes and/or load a particular linetype file.

0 Likes