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

XDTOOLS - an open project for creating tools for XData

44 REPLIES 44
Reply
Message 1 of 45
АлексЮстасу
4756 Views, 44 Replies

XDTOOLS - an open project for creating tools for XData

I invite to participate in an open project to create the common free user tools for XData - XDTOOLS.
It would be better to solve this problem based not on XData, but on Xrecord. But doing this is more difficult, and I did not find ready-made developments.

 

The goal is to give users in base AutoCAD a convenient and productive opportunity to add descriptive/additional information to graphic elements and use it.
And thus, make it possible to make the models/drawings more informative, and use AutoCAD more productive.
Naturally, this should be expected from Autodesk itself. But he limited himself to two weak, uncomfortable, with errors commands in Express, 20 years ago.

 

For Xdata, there are many free Lisp's, which can be use for creatting the desired set of commands - see archive on googledisk, XData_32_collection_Readme.zip .
But these tools need to be made convenient, productive, fully functional and safe.


Can be 10-12 commands in XDTOOLS for:
I. Managing XData Apps descriptions.
Create/edit Apps descriptions, detect problems and errors.
II. Using XData Apps:
Adding/removing Apps to graphical elements, entering values, viewing/editing values, searching for objects with Apps and specified values.
III. Transfer, communication with XData Apps:
Saving/loading data from XData to another representations. Exchange data with vertical applications AutoCAD and other software.

 

I am not a programmer at all, I propose this project as a user. And I hope for the participation of programmers.

Don't need much to create. It's not hard to create. But this can help to qualitatively improve the use of AutoCAD.

 

Added later:

20 XDTOOLS commands have now been made - see attached archive with Palette commands.

 

Added later:

A development of the XData use and a continuation of the XDTOOLS project is the XDLabel pilot-project - bulk inscriptions creation from the XData fields values, the creation of a link between inscriptions and their objects, and the restoration of inscriptions.

See from #37 and XDLABEL.fas. Last - #41-43. Five commands. Commands are updated and improved.

 

Added later:

The second XDPoint subproject is creating and using links for "point" objects: Points, Blocks, Circles, 3DSolids, Tables, Lines. The first three basic commands are. 

See from #38 and XDPoint.fas.

 

Added later:
The command common to XDLink and XDPoint for selecting related labels and/or point objects is XDLINK_SINGLESEL. Performed for one specified object - for unambiguity.

See #39.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

44 REPLIES 44
Message 2 of 45

What's the benefit over using attributes to hold and extract data inside blocked objects?

That seems to be a convenient way to hold data inside a drawing.

 

Can you provide more background info on the XDATA Concept?

-Tim

Message 3 of 45

Yes, XData is a way to store additional, non-graphical data inside a drawing. And XData can be in any AutoCAD graphical primitives and graphic objects.

 

Here the concept is:
- all are defined by the users themselves. They just need to give common tools for this - XDTOOLS.
- all XDTOOLS programs must be safe, i.e. comply with all restrictions for XData, and do not affect XData created by the AutoCAD itself (not only in Electrical) and other programmers.
- XData can be convenient for small projects, small descriptive data. If for user does not have enough XData capabilities, he can switch to external databases or to Xrecord.

 

For example:
- in the AutoCAD in Express there are only two commands - XDATA and XDLIST. And users can already use them to add and view descriptive information to graphic elements.
- Map/Civil has an analogue of XData - Object Data (OD). For OD, there are only a minimum of the most common tools - create/edit OD descriptions, attach/detach OD, view/edit values. And this is enough that many users can constantly give them the descriptive information they need about objects in the OD. And create drawing models more informative than graphics.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 4 of 45

I will clarify: it is better to create programs on Lisp - they operate outside the versions of AutoCAD, and they are easier to change if necessary.

 

For example, it was useful to get general information about XData in the selected objects or in the entire dwg - "statistics."
I wrote about this in the topic - https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xdata-with-the-same-application-name...

XData_stat.png

 

In the program text, can insert a list of ignored Apps - created by the AutoCAD itself and its vertical applications:

 

acad* gradient* IRD PE_URL

 

or

 

"ACAD" "Acad*" "GradientColor#ACI" "PE_URL" "IRD" "VIA_WD_*" "ACE_TABLE_*" "CIM_WD_*" "AVE_*"

 

etc.

 

For example, need a window on Lisp with two lists and vertical scrolls:

view-edit2_vertical.png

Top list for Apps, bottom list for content.
Selecting App in the top list gives it content in the bottom list.

A selection (double-click) in the lower list gives the input/edit value line window.

String_Edit_XData_1.png

Distance_Edit_XData_1.png
The window for two lists is required to enter/view/edit the content of Apps XData.
This window can be used in several programs for XData.

 

Etc.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 5 of 45

Now there is such a program for statistics XData - XDTOOLS_STAT.lsp.

It was mentioned above:

XDTOOLS_STAT.png
It was written by a very inexperienced programmer, but the program performs the task.

An experienced programmer wrote a function for finding the XData Apps of the same name with a different data composition.
If there is a proposal to change it or improve it, then you can participate.


The XDTOOLS project is open - there are tasks that have not yet been started, you can offer your own.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 6 of 45

Now, in October, turns 31, as Autodesk added XData!
And until now, users do not have enough tools to use them.
I invite you to participate in this project - XDTOOLS.

 

I found a suitable dialogue - from Lee Mac, http://www.lee-mac.com/listboxsync.html.
It has two lists, the content of the second depends on what is selected in the first.
The dialog can be modified to vertical. And add a double-click value editing row invocation to a row in the second list.
In the top list, display Appnames, in the second value of the selected App.

XD_VE_iv.png

This dialogue is needed for 3-4 programs for XData.


For example, need a user-friendly program to create/modify XData Apps. XDATA from Express is inconvenient, only allows you to create Apps, but there is no way to modify them.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 7 of 45

For testing - XDTOOLS_VEDIT.lsp.

View, enter, edit contents of XData:

XDTOOLS_VEDIT.png

For all selected objects.

 

Note: The programmer is a beginner, an amateur, so the code may be very weak.
But the program (it seems) does everything I think is necessary.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 8 of 45

Corrections and improvements.
For XDTOOLS_STAT radically improved speed for heavy files.
For XDTOOLS_VEDIT a few small but significant refinements.

 

Another command for finding incorrectnes XData and problems that may be related to XData - XDTOOLS_CHECK.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 9 of 45

Adding the specified XData to all selected objects - XDTOOLS_ADD.lsp.

XDTOOLS_ADD.png
Surprisingly, there was no such routine among the many routines from the forums. There were different routines for adding programmatically defined specific XData. There is an XDATA command from Express that creates XData, and adds it to a single object.


There are two close routines - copying all XData from a sample object to a set of selected objects.


But a convenient and sufficiently controllable command was not available for some reason.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 10 of 45

Happy New Year holidays!

 

Just created - XDTOOLS_MDEFINE.lsp.
This is the key routine for user work with XData.
Users will now be able to fully manage their descriptive data in XData.

XDTOOLS_MDEFINE.png

Creating, deleting, renaming XData Applications.
Creating, deleting, sequencing, changing types of XData fields.
The routine "sees" only XData not reserved by AutoCAD and its applications.
The routine accounts for possible errors in XData definitions.

 

XDTOOLS_VEDIT.lsp and XDTOOLS_ADD.lsp clarified and fixed.

 

Most likely a new version of XDTOOLS_STAT.lsp will be available soon.

 

For testing.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 11 of 45

New command is for selecting objects with specified XData, XDTOOLS_SELAPPS based on the routine from CADaSchtroumpf.

_0-1642988851611.png

 

Can specify any number of XData Apps or none. With the option "without the selected" can select objects with XData, without XData, with specified XData, without specified XData.

 

In the archive it is with the other 5 commands - XDTOOLS-v-0-4.zip.
All commands are improved.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 12 of 45

New command - to remove the specified XData from selected objects, XDTOOLS_REMOVE based on CADaSchtroumpf routine.

XDTOOLS_REMOVE.png

Any number of XData applications can be specified.

 

The attached archive with the other 6 commands is XDTOOLS-v-0-5.zip.
All commands are improved and fixed.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 13 of 45

Hi, all,

 

There are ideas about creating routines for better and more convenient use of XData.

 

To augment the XDTOOLS :

1. Loading object property values into XData.
2. Assigning object properties based on values in XData.

3. Loading Appnames XDatas into Hyperlinks. (done)
4. Removing Appnames XDatas from Hyperlinks. (done)
5. Loading "Text to display" Hyperlinks into the specified XDatas. (done)
6. Creating an ID in the specified XData field with possible prefixes and suffixes. (done)
7. Exchanging values from specified fields of different XData. (done)
8. Calculations for the values of the specified XData field.
9. Loading the content of text objects (texts, multitexts, multileaders, dimensions) into the specified XData field of the objects located near (within the specified tolerance) the text objects.
10. Uploading values from XData fields as contents of the corresponding text objects.
11. Creating Tables from the XData content.

And so on.


I invite to participate in the XDTOOLS project, to create routines for user-friendly and safe addition of descriptive information to objects.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 14 of 45

The next one to test - XDTOOLS_SELVALUES - objects selection with specified values in XData for the specified objects.

XDTOOLS_SELVALUES.png

Can set selection criteria for several fields at once.

A mask - "*" for character values is valid, and for any values selection on >, < and <> (not equal) is valid.

Entered value in the selection field means selection of all objects with such values. An empty value means selection with no values.


I read that such selection is not possible for XData. It is possible, and done, and it works.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 15 of 45

The next one to test is XDTOOLS_XD2XD, for transferring values from a field to an XData field, including from one XData to another if they are attached to the same objects:

XDTOOLS_XD2XD.png

Allows to take data from XData created by AutoCAD. For example, from hyperlinks. (Which are also the XData).

In Replace mode, the data is replaced. In Add mode, it is appended. Numerical values in Add mode are summed up taking into account their sign.
With this tool you can create complex compound values, ID.

 

This command + XDTOOLS_MDEFINE can be used to normalize XData of the same name/different structure with preserving their data.

Etc.


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 16 of 45

The next for testing are two commands for XData <--> Hyperlinks:
1. XDTOOLS_2HYPERLINKS - create hyperlinks from XData names. Existing hyperlinks are saved in XData "SAVED_PE_URL".
2. XDTOOLS_RETURNHYPERLINKS - restore the original hyperlinks from the saved XData "SAVED_PE_URL".

 

Thus, can make XData "visible" - as hyperlinks - at any time. Such hyperlinks begin with "xd=":

Hyperlinks_en.png

And such hyperlinks can be removed at any time.

 

In this way can also change the hyperlinks wholesale and retail with XData. And create hyperlinks with the desired content from XData "SAVED_PE_URL".

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 17 of 45

Three more commands for testing - working with attributes:
1. XDTOOLS_ATTRLOAD - loading block attribute values into XData fields attached to blocks,
2. XDTOOLS_2ATTR - load values from XData fields into block attributes,
3. XDTOOLS_ATTRFILE - creating a template text file of attribute mapping to XData fields.

 

Loading values from attributes into XData fields and vice versa is based on a user-created match text file.
The match file with the structure:
<Block name> <Attribute tag> <XData name> <Field number XData>

matching_bl_at_xd_fld_en.png
Separators: tab, comma, semicolon. Commented out after the "?" sign.

The programmatically created template contains the descriptions of the structures:
<Block name> <Attribute tag>
and
<XData name> <Field number XData> <? Field Type>.

 

With this template, the user can learn faster and more completely about the blocks with attributes in dwg and about XData and their structure in dwg.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 18 of 45

...
2. I admit that very soon I may not be able to work in AutoCAD and develop the project. But on the whole the project has already happened - the minimum required set of custom commands for descriptive data in XData has been created.

I hope to still be able to finalize and publish another 3-5 commands I started before that.

 

The next command to test is XDTOOLS_ID for creating identifiers/numbers with prefixes and suffixes in the XData field:

XDTOOLS_ID.png

With this command and the XDTOOLS_XD2XD command (by adding values from the field to the XData field) can create complex identifiers. For example, to create cadastral numbers or complex product/material nomenclatures, etc.

The created identifiers can be unloaded to the specified attributes, e.g. for blocks.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 19 of 45

😞 😞 😞

 

Two more commands for testing:
XDTOOLS_PROP2 - load property values of graphic elements into the specified XData field.
XDTOOLS_2PROP - assign properties of graphical elements from the values in the specified XData field.

XDTOOLS_PROP2.pngXDTOOLS_2PROP.png

For example, to save to XData Z/Elevation objects, lengths, areas, etc., etc. - from color to table style. Including for unloading to attributes, for data export.
27 types of properties are saved.
For example, for assigning Z/Elevation to objects from data in XData. Including possibility to restore objects position by saved coordinates, to restore color, layer and other properties - 16 types of properties.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

Message 20 of 45

☹️☹️☹️☹️

The next command to test is XDTOOLS_CSV2 - load data into XData from csv, txt files with homogeneous structure with tab or semicolon or comma delimiters and with HANDLE.

XDTOOLS_CSV2.png

After specifying a file, data from all files with the same prefixes in their names is loaded. The prefixes are parts of the names up to the "&" symbol, if there is one in the name of the selected file.

Can also load data from files created by ATTOUT Express tools, etc.

In the general archive with fixed XDTOOLS commands.

 


-- Alexander, private person, pacifist, english only with translator 🙂 --

Object-modeling _ odclass-odedit.com _ Help

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

Post to forums  

Autodesk Design & Make Report