Active Contributor
Posts: 30
Registered: ‎09-13-2012
Message 1 of 3 (141 Views)

setLineWeight - my weight

141 Views, 2 Replies
09-18-2012 02:06 AM

If it's possible, how can I do?:


enum MyWidth {

kLnWt000 = 0,
kLnWt005 = 2,
kLnWt009 = 3,
kLnWt013 = 5,


kLnWtByLayer = -1,
kLnWtByBlock = -2,
kLnWtByLwDefault = -3




I need function:

void setLineWeight(AcDbEntity* pObject, enum MyWidth)
     pObject->setLineWeight(MyWidth, true);                         // - my param
     //pObject->setLineWeight(AcDb::kLnWt120, true);          // - from SDK


I greet

ADN Support Specialist
Posts: 737
Registered: ‎03-21-2011
Message 2 of 3 (122 Views)

Re: setLineWeight - my weight

09-20-2012 07:03 AM in reply to: ZK_BUDiKOM

If you can provide more details on what you are trying to do then it will give us a better picture.


From the code, it appears that you intend to pass your enum value instead of the one provided in the SDK.


Not sure why you would want to do that, but it should work provided the numerical values of those enums are the same.


The other way is to create a simple wrapper method that maps your enum values to the ones provided by the SDK and then calls the setLineWeight.



Developer Technical Services
Autodesk Developer Network

Posts: 1,449
Registered: ‎04-09-2008
Message 3 of 3 (106 Views)

Re: setLineWeight - my weight

09-21-2012 10:23 AM in reply to: ZK_BUDiKOM

ZK_BUDiKOM wrote:

If it's possible, how can I do?:



Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!