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

When working with Lisp functions in .NET what is the "entity name"

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
drauckman
691 Views, 4 Replies

When working with Lisp functions in .NET what is the "entity name"

I am trying to call AutoCAD Electrical API commands (LISP based) in .NET and in the documentation it states that it returns the entity name. 

 

In the .NET developers guide it says under the section "Working with ObjectID's" that the 3 ways to access an object are: 

  • Entity handle
  • ObjectId
  • Instance pointer

What is this entity name, is there a .NET equivalent, and how can I use it to access the database?

4 REPLIES 4
Message 2 of 5
caddzone
in reply to: drauckman

The managed equivalent of an entity name is an ObjectId.

 

If a LISP function is called from .NET, and it returns an entity

name, the returned ResultBuffer will contain an ObjectId.

 

Conversely, if you call a LISP function from .NET that takes

an entity name as an argument, the ResultBuffer argument

must contain an ObjectId.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 3 of 5
drauckman
in reply to: caddzone

Thanks! That makes sense, it would be nice if everyone referred to it as an ObjectId rather than in some cases calling it a name (which could be confused with block name)

Message 4 of 5
caddzone
in reply to: drauckman


@tonofsteel wrote:

Thanks! That makes sense, it would be nice if everyone referred to it as an ObjectId rather than in some cases calling it a name (which could be confused with block name)


No, because "it" is not "it" it is "them" - and they are not the

same thing. They are transalated from one (entity name) to

the other (ObjectId) depending on which direction they're

going.

 

 



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 5 of 5
drauckman
in reply to: caddzone

From above:

 

"Conversely, if you call a LISP function from .NET that takes

an entity name as an argument, the ResultBuffer argument

must contain an ObjectId."

 

From what I see after messing around with this in code is that the ObjectID is just that, and the "entity name" is a typed value that has the Value of ObjectID and TypeCode of (int)LispDataType.ObjectID which happens to be 5006, is it this typed value that is being called the "entity name"?  I am not very familiar with Lisp, but I thought that since you send it typed values and it returns typed values, that is how it represents different data, or does it convert a typed value into a totally different datatype that is the so called "entity name"?

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost