Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Retrieve NOTES information.

11 REPLIES 11
Reply
Message 1 of 12
cbutler1
600 Views, 11 Replies

Retrieve NOTES information.

In AutoCAD MEP and other verticals, they have Notes that can be attached to entities via the Properties dialog box.

 

I'm trying to retrieve that information using MEP 2012.  The information from this link, if it worked in the past, doesn't appear to work now:  http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/get-Extended-Data-from-Aec-Wall/td-p/... 

 

In the example from the link the user was able to get entitiy data like this:

 

((-1 . ) (0 . "AEC_TEXT_NOTE") (5 . "BC4") (102 . "{ACAD_REACTORS") (330 . ) (102 . "}") (330 . ) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 . "AecImpObj") (100 . "AecImpObj") (3 . "") (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 . "AecDbTextNote") (1 . "hejhejhej2"))

I drew a simple line then attached a note to the entity.  Trying the code from the example above, my result does not contain the AecDbTextNote information.

 

((-1 . <Entity name: 7ffff284210>) (0 . AEC_TEXT_NOTE) (5 . 6FBE9) (102 .
{ACAD_REACTORS) (330 . <Entity name: 7ffff284200>) (102 . }) (330 . <Entity
name: 7ffff284200>))((-1 . <Entity name: 7ffff284210>) (0 . "AEC_TEXT_NOTE") (5
. "6FBE9") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7ffff284200>) (102 .
"}") (330 . <Entity name: 7ffff284200>))

 

Help appreciated.

Craig

 

11 REPLIES 11
Message 2 of 12
dbroad
in reply to: cbutler1

What are you hoping to do with this information once you obtain it?   There are built-in ways to access this information without programming (multleaders, schedules, tags, etc.) AFAIK

Architect, Registered NC, VA, SC, & GA.
Message 3 of 12
BlackBox_
in reply to: cbutler1

Also keep in mind that you're dealing with a vertical platform... Not everything is exposed to DXF, or LISP generally... Often times in my work (with Civil 3D), if even possible to access certain Objects via LISP, and External COM Object interface is required, if not stepping up into the .NET API (and even then, not everything is exposed to .NET API, and I still end up using DllImports, or COM; but that's another discussion).

 

HTH



"How we think determines what we do, and what we do determines what we get."

Message 4 of 12
BlackBox_
in reply to: cbutler1

Also worthy of note, is that the post you linked to in the OP is from 2006... Certainly there have been significant changes from then to your AMEP 2012 version. :thumbsup:

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 5 of 12
cbutler1
in reply to: cbutler1

Thanks for the posts to date. 

 

 

We have a large number of custom notes for all sorts of entities and need to retrieve that information. For various reasons, lisp would be the ideal choice. 

 

I realize the post I referenced is old. It's unfortunate that it appears to have worked in the past but something must have changed with future releases.  I was hoping someone would know if the information is still accessible somewhere via lisp.  And while it is a vertical, the note information appears to be used across several vertical platforms from what I can glean from other posts so I was hoping the data would be more readily accessible.

 

Craig

 

 

 

Message 6 of 12
dgorsman
in reply to: cbutler1

Have a look at the additional references in the entity information. Typically, programs with a many-to-one data relationship (like associating a note or notes from a central list to a drawing entity) will not duplicate the information to every entity. Instead, they will add a link to the drawing entity which points to a central storage mechanism like an Extension dictionary/XRecord on the document, an external database lookup ID, and so on.
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 12
dbroad
in reply to: cbutler1

What motivates me to dig into the ACA/AMEP dictionary mess(from a LISP perspective) is to have an application where I would ever use it.  I can already do everything that I need with tags and schedules. Perhaps if you could share more about how you could use this information in a way that tags and schedules don't, it might be worth investing a couple of hours to track the answer down.  Otherwise it's time down a rabbit hole.

 

You might pose the same question on the .NET forum as every time I asked anything about customizing  ACA/AMEP, all the experts said there was no supported LISP access.  The language/platform you need to use is one of the .NET languages.  Blackbox's repy is similar. Go to .NET and maybe get a solution.

Architect, Registered NC, VA, SC, & GA.
Message 8 of 12
BlackBox_
in reply to: dbroad


@dbroad3 wrote:

 

The language/platform you need to use is one of the .NET languages.  Blackbox's repy is similar. Go to .NET and maybe get a solution.


While I obviously cannot speak with any authority on the specific task of obtaining the 'notes' from a given entity, I'd be a bit shocked if there wasn't an COM Object interface (i.e., Visual LISP, or VBA) that could be used to save the 1+ year of self-teaching the basics of the AutoCAD .NET API, let alone the complexities of vertical(s).

 

Worth some Googling... That's all I'm saying... Lord knows you won't find much of that in the online help. LoL

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 9 of 12
mid-awe
in reply to: cbutler1

For the additional information I like to utilize the:

 

(vlax-ldata-put dict key data [private])
(vlax-ldata-get dict key [default-data] [private])
(vlax-ldata-list dict [private])
(vlax-ldata-delete dict key [private])

 

functions. So far they have not let me down. Smiley Happy

Message 10 of 12
dbroad
in reply to: BlackBox_

I have interacted personally with the ACA designers (by email)  in the past and they have assured me that there is supported activeX access and no intention to provide one in the future.  ActiveX, I believe, only exposes part these features.  I'm not saying that it isn't possible to find the needle in the haystack by brute force looking.  The properties and methods of these objects however are directly exposed via .net in the form that those objects were intended to be manipulated with.  

 

There is also no logic or help documenation for tracking these features down.

Architect, Registered NC, VA, SC, & GA.
Message 11 of 12
BlackBox_
in reply to: dbroad


@dbroad3 wrote:

I have interacted personally with the ACA designers (by email)  in the past and they have assured me that there is supported activeX access and no intention to provide one in the future.  ActiveX, I believe, only exposes part these features.  I'm not saying that it isn't possible to find the needle in the haystack by brute force looking.  The properties and methods of these objects however are directly exposed via .net in the form that those objects were intended to be manipulated with.  

 

There is also no logic or help documenation for tracking these features down.


If I am understanding you correctly, the ACA designers have confirmed that there is not a supported ActiveX (COM) accessible interface for Visual LISP/VBA?

 

No worries; I only thought to suggest one abuse Google for a few to confirm, but that's good enough for me. :thumbsup:

 

Especially since these APIs have been exposed to .NET, I'd then simply code up some LispFunction Methods as needed if this had to be done via LISP... One is then only relegated to the ResultBuffer return types when 'getting' something from a given Entity.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 12 of 12
dgorsman
in reply to: mid-awe

When a drawing with LDATA is opened on a computer which doesn't automatically call (vl-load-com) during the open, or when you double-click the DWG file to open it, you get a proxy object warning unless that dialog has been supressed.  One of the reasons I moved away from LDATA and into dedicated Extension dictionaries and XRecords.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


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

Post to forums  

Autodesk Design & Make Report

”Boost