Jump to content
btraemoore

Accessing a layers linetype name?

Recommended Posts

btraemoore

From what i am reading, it takes some work to access a layers linetype name (LineTypeTableRecord.name). Is there another way around this? Is there a way to access the linetype name from within the layer in question?

Share this post


Link to post
Share on other sites
BlackBox

No work at all, really... You might want to check out Viru's ADNDevBlog article Identifying the entities line type, which is one of the top few results in a quick Google search. :thumbsup:

Share this post


Link to post
Share on other sites
btraemoore

i figured it out, i was just not thinking the right way..

 

LinetypeTableRecord Ltype = (LinetypeTableRecord)curTrans.GetObject(
					curLayer.LinetypeObjectId,OpenMode.ForRead
			        );
newRow["LINETYPE"] = Ltype.Name;

Share this post


Link to post
Share on other sites
BlackBox
i figured it out, i was just not thinking the right way..

 

LinetypeTableRecord Ltype = (LinetypeTableRecord)curTrans.GetObject(
					curLayer.LinetypeObjectId,OpenMode.ForRead
			        );
newRow["LINETYPE"] = Ltype.Name;

 

I should hope so... That's exactly what Viru did in his code sample in the above referenced article (get the Name Property of the LinetypeTableRecord Object).

 

Glad you got it sorted.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...