Hello ,
I have a question:
I have some dxf (from 1 to 10 that illustrate the basic pieces of an object)
and i need help for a little script in c #.
I should
import the various dxf and add them to the end of the y position of the previous dxf.
example
dxf1, dxf2, dxf3…dxf10
new dxf that
will contain:
dxf1
small space
dxf2
small space
dxf3
…
etc.etc.
dxf10
Thanks to everyone who will have the patience to read and help me
Hello - if you get the bounding box of the incoming files and keep track of these in your script, you should be able to get things positioned as you like.
Thanks for your answer.
I explained myself wrong and I will try to be clearer this time.
Unfortunately, my development is only a small part of a process that is not considered necessary to know in detail.
what I know:
the user works on a rhino drawing (.3dm)
The user launches a custom command that opens a form that allows him to choose some data for a subsequent cam software.
The data is in rows so it can choose multiple rows.
These lines represent dxf files in a directory.
So unfortunately not related to the open 3dm.
In reality it is not entirely true! the open 3dm contains metadata which it automatically assigns to the file name
I know it’s terrible!
However this part works: at the end 4 selected rows read & save 4 dxf files with the name coming from the 3dm metadata!
But now they asked me:
merge the n dxf files into a single dxf with the name that always derives from the 3dm metadata.
Obviously without leaving the 3dm displayed!
In fact Rhino is only used as the source of a string for a file name!
I don’t even know if it is the case to take other paths: like a batch that I launch in a console.
I tried to import from code
// absolute path dxf to append: test only
string dxf_File1 = “C:\dxf\dxftest1.dxf”;
string dxf_File2 = “C:\dxf\dxftest2.dxf”;
string dxf_File3 = “C:\dxf\dxftest3.dxf”;
//Load from function
List files2Import = new List();
//for test
files2Import.Add(dxf_File1);
files2Import.Add(dxf_File2);
files2Import.Add(dxf_File3);
The import works.
But of course I am going to overlap the open 3dm layers.
If I want to follow this path I think I should:
read the dxf files in a custom layer.
And then export that layer to dxf.
And finally delete custom layer from 3dm!
it seems like a huge job!
Also because I’m not that expert!
For example:
how do I select loaded dxf?
Last complication:
I am forced to use Rhino 5!
Sadness! moan moan!
Thanks for the infinite patience of those who will read me and spend some of their time helping me!