ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AcDbField: what lies beneath _ObjId xxxxxxxxxxx value

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
AndrewCsWk
1011 Views, 5 Replies

AcDbField: what lies beneath _ObjId xxxxxxxxxxx value

Hello!

 Here is example of field creation

 

AcDbDatabase* pDb = acdbHostApplicationServices()->workingDatabase();
AcDbField *pField = new AcDbField();
pField->setEvaluationOption(AcDbField::kAutomatic);
pField->setFieldCode
(
ACRX_T("%<\\AcObjProp Object(%<\\_ObjId 8796087819200>%).InsertionPoint \\f \"%lu6\">%") ,
AcDbField::FieldCodeFlag(AcDbField::kObjectReference | AcDbField::kPreserveFields)
);

 

 

And i don't understand: _ObjId 8796087819200 <- this big value - is object id handle of selected object? If yes, its format - HEX or int? And how can it be so long ? 

If it is not object id handle - then what?

 

5 REPLIES 5
Message 2 of 6
owenwengerd
in reply to: AndrewCsWk

It is the object id as an unsigned integer.

--
Owen Wengerd
ManuSoft
Message 3 of 6
AndrewCsWk
in reply to: owenwengerd

Thanks, but i don't understand - why this value so long? When i draw simple circle - it's object id , as example, 4C in hex - but it's 74 in INT.
So, when i start "field" command and select "Objects" category and then - "Object" - expression tell me:

"%<\AcObjProp Object(%<\_ObjId 140696677801056>%).EntityTransparency>%" - _ObjId ????????

Message 4 of 6
owenwengerd
in reply to: AndrewCsWk

You are confusing Object ID and Handle. They are entirely different values.

--
Owen Wengerd
ManuSoft
Message 5 of 6
AndrewCsWk
in reply to: owenwengerd

So i have:  AcDbCircle *pCircle.

I get objectId pCircle->objectId(). Then i need put the object id in the expression string:
%<\AcObjProp Object(%<\_ObjId >%).EntityTransparency>%

 

So which method of AcDbObjectId class i must call to translate it to string?

Message 6 of 6
owenwengerd
in reply to: AndrewCsWk

You can cast AcDbObjectId to void*, then express the pointer value as an unsigned integer.

--
Owen Wengerd
ManuSoft

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost