News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Aging Macro - NewMakeXYZ

Started by ablincoe, August 03, 2016, 08:34:59 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

ablincoe

I have a desire (not a 100% need) to re-load a drawing or two and was thinking of modifying  DTs  NewMakeXYZ  so that I could export the data as a text XYZ file, and then possibly create a new macro to be able to re-load the information back into DC with minor modifications.

I was wondering if DT had possibly kept the  NewMakeXYZ  macro up-to-date with the newer releases of software  and if anyone had possibly already written an XYZ Load macro that handled things by the proper Entity Type as defined in the XYZ file  (instead of the limited  XYZ Import functionality provided).

Thanks for any asistance.

Allen Blincoe

DrollTroll

Hi Allen,

I believe the one I have posted in my toolbox is my latest revision. Should handle almost everything except Solid Surfaces, as best I recall. .

Although I've toyed with the idea, I haven't created any kind of ImportXYZ file that would handle the different entity types as exported from NewMakeXYZ. It should be doable for the most part; however you'd have to have special handling to recreate grids from the grid lines (basically import the grid lines as line entities, then use Surface Connect to generate new a grid from them, and afterwards remove the original line entities).
25 years with DesignCAD

ablincoe

DT, thank you for the comments.  I figured grids as well as a number of the  Solids  areas (especially multi-entity solids) could create lots of fun as well.  Another difficult area is going to be Entity Groupings (outside of Layers).

The  NewMakeXYZ  macro is currently very good at making good text based documentation for any drawing (or portion of).

With Grids, the following are the definite:
     You don't have any link/idea as to what the controlling geometry was
     You don't have the parameters for the original grid creation
     The person may have significantly modified the grid from it's original creation

With Solids, which I haven't used many of over the years, I see:
     The single entity solids should be straight forward
     The grouped entity solids

I guess it's time for me to at least start looking at getting the base geometry out and back in....

Allen

DrollTroll

NewMakeXYZ exports grids *as-is*. Internally a grid is a kind of composite entity -- the grid entity itself has a number of grid lines, which are essentially the 'cross-sections' of the grid.

Unfortunately BasicCAD has no "construct grid from parts" mechanism, so you'll have to read back in the Grid Lines as Line entities, and use Surface Connect to connect them together no intermediate breaks, and use Retain Original Point Order and Use Original Points), the resulting grid should match the original. Then, as I say, delete the stand-alone line entities used in construction.

You should be able to reconstruct solids by re-assigning the solid id to each component part as it's read in (planes) or constructed (grids). Similarly for simple groups, just assign the group id. For compound groups, it's a bit more complex but I think it's doable.
25 years with DesignCAD

ablincoe

Well, after looking at the size of the project and the amount of changes that need to be made, I think I am going to just use the "NewMake" to help me identify the exact areas that need to be updated and then do it manually from there.

Context  (at around line # 49):
' Automatically append .xyz extension if missing.
If Left$(fname$, 4) <> ".xyz" Then
  fname$ = fname$ + ".xyz"
End If

Correction:
If Right$(fname$, 4) <> ".xyz" Then

And the program expects an   all lower case   file extension (if there is one).

The worst that will happen if not corrected is:
Input File Name:        abcfile.XYZ
Output File Name:      abcfile.XYZ.xyz

Allen