Jump to content
Sam Jones

Assigning a Line Type in a drawing to a line in the drawing

Recommended Posts

I want to assign a line type with a specific name that already exists in the drawing to a line in the drawing.  The command "SetLSN()" requires an integer not a name, and that integer seems to reference a pattern to assign to the line not a line style.  How do I assign a line style named "Named Line Style" that already exists in the drawing  to a line for which I have a handle?

 

Yet again

TIA.

Sam 

Share this post


Link to post

Alternatively, is there a way to build a resource list that only includes resources (Line Types) that are already in the document?

Share this post


Link to post

Hi Sam, 

 

First try Name2Index as part of the SetLSN command:   SetLNS(H1,Name2Index('YourLineStyle');

 

Second, using a Folder Index of zero (0) in the BuildResourceList or BuildResourceList2 functions will return only resources in the current document.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×