Author Topic: MAP 3D Annotation Object  (Read 3077 times)

0 Members and 1 Guest are viewing this topic.

sparky

  • Guest
MAP 3D Annotation Object
« on: April 04, 2008, 10:05:28 AM »
Just discovered Annotation in MAP 3D 2007.  Created a Template, Created some Annotation.  Then I had this great idea.  Why not use VLisp to automate the annotation process for another file I have. 

Idea.  I have a graphical link between existing txt objects and lines.  There's the connection.  However MAP annotation creates a direct link with Object data from the line and when ObjData updates, I can update the Annotation...great.  BUT

1) the annotation tools don't let me choose any particular insertion point for the MAP (linked) annotation Blocks.They only allow, center-, end-, start- or Centroid-point. Or do they???
2) I've queried the Methods and Properties for the Annotation (Blockrefs) but there is no Property that stores the link to the Line Object!!  Is it stored in the Extension Dictionary?  If it is, how can <i access the data in the AutoCAD dictionary?  Is it locked, non readable or writable??
« Last Edit: April 04, 2008, 10:11:03 AM by sparky »

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: MAP 3D Annotation Object
« Reply #1 on: April 04, 2008, 10:14:07 AM »
Yes an No Sparky.


You see Adesk thought the workflow would be different than it is with MAP.
The tool you want is located here MAP>>Annotation>>Define Text Location

ADETEXTLOC (Map Labelpoint Location command)
 
 

Use this command to specify a new label point for an object.

An object's label point is used as the reference point when you add text to an object during property alteration. By default, the label point is the centroid of the object. Use this command to specify a different label point.

Respond to the prompts:

Select object:
Use any object selection method.

Pick new text location <X,Y>:
Enter new X and Y coordinates, separated by a comma.

To use this label point when inserting text during a property alteration, choose LABELPT from the Insert Point list in the Define Text dialog box.

Then you can perform these annotation functions during a query against your data, and have those annotations populate where you want them instead of at the centroid as is the default.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

sparky

  • Guest
Re: MAP 3D Annotation Object
« Reply #2 on: April 04, 2008, 10:29:21 AM »
Thanks for the Reply.  I've tried the  ADETEXTLOC command but when I end the command the txt position doesn't update (either directly after the command or directly after the update annotation - with discard - command.  ?? :?

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: MAP 3D Annotation Object
« Reply #3 on: April 04, 2008, 10:35:38 AM »
Well, Sparky this suggests you use my email address and send me a phone number so that we can figure out where you are clicking or clacking on this.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

sparky

  • Guest
Re: MAP 3D Annotation Object
« Reply #4 on: April 04, 2008, 10:44:38 AM »
Not quite sure what you mean. :| Does the newly defined txt location point only become current when you query in the data from a new MAP project with the drawing attached? I'll have to try that.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: MAP 3D Annotation Object
« Reply #5 on: April 04, 2008, 10:52:10 AM »
Here it works directly place the annotation point, attach the annotation; change the anno point, and refresh or update, the text repositions itself.

The other (query) was as an option to the code you were thinking of using.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

sparky

  • Guest
Re: MAP 3D Annotation Object
« Reply #6 on: April 04, 2008, 11:03:50 AM »
Here it works directly place the annotation point, attach the annotation; change the anno point, and refresh or update, the text repositions itself.

The other (query) was as an option to the code you were thinking of using.

OK, this is really weird.  I insert an annotation object based on my selected template. I use the default .Labelpt as insertion pt.  I get the annotation I want...super.  I just want it moved from the line to somewhere else nearby.  I use the ADETEXTLOC command, pick the annotation object just created then pick a new location for the text (point). ...nothing happens.  So i try updating all annotation with the required annotation template, hoping that the new location will be activated....nothing happens. Any idea why?

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: MAP 3D Annotation Object
« Reply #7 on: April 04, 2008, 11:05:41 AM »
yes....send me plane ticket  :wink:


Spark, it is your order of operation and the object you are operating on.


Try this:

Draw a Polyline
Define an annotation template that uses the objects .LENGTH as the label
Place the Annotation on the polyline
Now use the Define Annotation Location command; CAREFUL here
when prompted to select the object

Command: _ADETEXTLOC
Select object:SELECT the POLYLINE you drew in step one above
Pick new text location<89.7805,9.9244>

Then when you update or refresh the annotations they will respond correctly. 

(I have my passport) :roll:






« Last Edit: April 04, 2008, 11:18:44 AM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
MAP 3D Annotation Object a Practical Application
« Reply #8 on: April 04, 2008, 11:51:36 AM »
So, let's take a look at how this could help the user.

At the most basic level, the cad layer is sufficient to classy an object for GIS purposes.
Additional data can be attached to the objects as well in the forms of Object Data, and or Database Links.

Basic Scenario:

A file containing lines, and or polylines representing various utilities on respective layers. Utilities Source File

The user wants a Map showing the lengths and location of specific types; lets say a particular size and material of pipe that is being scheduled for replacement.

The user opens a new Map session and attaches to the Utilities Source File.
Performs a query against the attached file, and uses an annotation template as part of the Alter Properties operation. By default the Labelpoint is in a lame location and the MAP looks terrible.

The user should then delete the bad labels, redefine the labelpoint for the objects and A) save back to the source and run the query as defined or B) refresh the annotations. Then print the Map, or set up a Map Book Query should the size of the mapping warrant it.


(This probably doesn't answer your question about doing this with VLISP, however I don't see a need to do so. The challenge will be grooming the data so that you like where the labelpoint is. Then the annotation placement and creation is a standard query process with no need to code anything. Further if that query is saved to external libray anyone can perform this task against your dataset.)
« Last Edit: April 04, 2008, 12:25:14 PM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

sparky

  • Guest
Re: MAP 3D Annotation Object
« Reply #9 on: April 04, 2008, 12:10:12 PM »
Why didn't MAP just ask me which type of object to pick?  I mean I'm redefining the annotation insertion pt not the Line "insertion pt". Sorry for wasting your time.  Got it. Maybe my user profile isn't what AutoCAD expected.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: MAP 3D Annotation Object
« Reply #10 on: April 04, 2008, 12:17:12 PM »
The real question is why the prompt to attach a label point doesn't pop up the instant one creates data? Although it would be rather annoying. The prompt the user does get is rather obtuse, something like Select Object(s) to Change Label Point:
And then the annotations would pop right over to the new location giving the user dynamic feedback that they had infact changed the labelpoint. Map can be a little tricky like that, read appear backwards.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

sparky

  • Guest
Re: MAP 3D Annotation Object
« Reply #11 on: April 04, 2008, 02:45:20 PM »
Actually I think I could do all the work with a LISP Skript.  You said the challenge would be grooming the Data to get the Annotation location to my liking. Exactly. I already have Text objects for every line(!). They're just not linked to the Line object through a structure like the the MAP annotation object. You might ask why I would want to bother doing all that work then? I've just asked myself that as I read your last couple of posts, as I think you assumed I'm trying to annote objects from scratch.

I just would like a properly annotated MAP with object data dependency! I'll do it in my free time if neccessary, just to practice. Problem still remains about how to access the Properties in ActiveX that link the Annotation Block Attributes to the source Object and its data! 

I just took a quick look at Stig Madsens document on Dictionaries in AutoCAD, maybe I need to try a few bits of code and see what I come up with although I doubt I'll be able to access the ACAD Dictionaries.  They are closed to the APIs aren't they? Or I could use vl-cmdf and use the Annotation commands on each line and create an annotation for each its corresponding, correctly located text objects (using vl-cmdf with the ADETEXTLOC and the new Annotation insertion points). Then just delete the old text objects. Or am I stark raving mad :ugly:  ?

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: MAP 3D Annotation Object
« Reply #12 on: April 04, 2008, 03:14:06 PM »
IF the text is unique I believe that you should use it to create your DBLINKS, if linking is what you are after.
If the text is not unique this will present some challenges.
I would suggest that you create the object data and attach to the objects, then the text objects can
always be MAP derived annotations based on your templates. Then you can use MAP queries, alter properties operations to label only the objects that need labels when you publish your maps.

And yes I thought you were attempting to use Map annotation templates, to place these labels.
Be your Best


Michael Farrell
http://primeservicesglobal.com/