3DR Script- Mass Export Sections

Discuss Leica Cyclone 3DR software here.
Post Reply
User avatar
VisoProOskar
I have made 10-20 posts
I have made 10-20 posts
Posts: 10
Joined: Tue Jan 24, 2023 9:06 am
1
Full Name: Oskar Svensson
Company Details: VisoPro Sverige AB
Company Position Title: VisoPro Sverige AB
Country: Sverige
Linkedin Profile: Yes
Has thanked: 1 time
Been thanked: 1 time

3DR Script- Mass Export Sections

Post by VisoProOskar »

Hello! I have a project with alot of Planar Sections. Is there a way to select all of them and automatically induvidually export them to IGES with the same name as in the tree? Would save me alot of time to not have to select each section and export it.

Anyone have a script for that?

Image
Example of the tree structure
Oskar Svensson, VisoPro Sverige AB
Image
Nicolas L
Forum Supporter
Forum Supporter
Posts: 116
Joined: Tue Sep 01, 2020 8:25 am
3
Full Name: Nicolas LANDRIVON
Company Details: Technodigit
Company Position Title: Sales and Support
Country: France
Linkedin Profile: Yes
Been thanked: 53 times

Re: 3DR Script- Mass Export Sections

Post by Nicolas L »

Hello

A script should do the job
Please try the following one that you will have to adjust:

var mat=SMatrix.New();
mat.InitIdentity();
var projectContent=SSetMultiline.All(2);
for(var i=0;i<projectContent.length;i++)
{
var currentSetMultis=projectContent.Explode();
var currentShapes=new Array;
for(var j=0; j<currentSetMultis.length;j++)
{
var currentShape=SShape.New(currentSetMultis[j], SShape.NONE)
currentShapes.push(currentShape);
}
SCADUtil.Export("C:/Users/firstname.name/Desktop/"+i+.iges",currentShapes,mat);
}

NOTE: change the path, get the individual name and the script is valid for multi-lines only (several associated poylines).

Nicolas L
Post Reply

Return to “Leica Cyclone 3DR”