ObjectARX

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

setLineWeight - my weight

143 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
Balaji_Ram
Posts: 746
Registered: ‎03-21-2011
Message 2 of 3 (124 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.

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Moderator
Alexander.Rivilis
Posts: 1,450
Registered: ‎04-09-2008
Message 3 of 3 (108 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?:



No.

 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и 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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.