Jump to content

Recommended Posts

Posted

Greeting to everyone,

 

I am a user of the DraftSight CAD software but I think not that it will matter, for the issue I will ask upon is same in for all the CAD programs as far as I know.

 

Therefore, I am in a need to import a massive database of coordinates in the CAD program and using the .SCR file with SCRIPT command seems like a jolly good solution for me. The deal is, I've never written a .SCR file before and I know only basics of it from what I studied at my faculty course.

Take a quick example, I need to import a command that will place me a block at an ordinary spot and I've written something like this in the notepad as it works perfectly:

 

INSERTBLOCK BLOCK1
POSITION 5,5
X SCALE 1
Y SCALE 1
Z SCALE 1
ANGLE 0

 

A real buggy thing is that I would need to retype this for few thousands of times because my data base contents around 5-6 thousands of different coordinates.

 

So, is there a possibility to write this command that will define a same X,Y,Z scales and angle for all files while you can just change coordinates. My first thought was to try this:

 

INSERTBLOCK BLOCK1
Position
5,5
6,5
7,8
4,5
X SCALE 1
Y SCALE 1
Z SCALE 1
ANGLE 0

 

Where the coordinates would be 5,5 , 6,5 , 7,8 , 4,5 in the xOy plane and scale would be same for every coordinate, but it didn't work. There is nothing else that comes across my mind at this moment. I hope I've made my self understandable on my problem and please ask me to elaborate if something is not clear on, as you have presumed this far that English is not my native speaking language.

 

I am sincerely grateful and sending regards,

 

Aleksandar

Posted

Use excel, in autocad you can have 1 liners rather than 1 option per line need to be aware of the need sometimes to have extra spaces as a

 

insert myblock1 x,y 1 0

insert myblock2 x,y 1 0

insert myblock3 x,y 1 0 etc you use the concatenante command to create a new column which you just copy and paste out

 

Excel points.jpg

Posted

Thank you for your response BIGAL, I think I'll work something out with this excel solution.

 

Regards,

 

Aleksandar

  • 4 weeks later...
Posted

nice BIGAL works here thump_8312211excelcode.jpg

 ; ; EXCEL CODE ; =CONCATENAR("(-insert PT_TOPO";" ";W2;",";X2;",";Y2;" ";"1000";" ";"1000";" ";"0 )") ; -insert PT_TOPO 1.2379,3.6043,-10.0000 1000 1000 0 -insert PT_TOPO 1.2379,3.6043,-10.0000 1000 1000 0 -insert PT_TOPO 0.7691,2.2936,5.0000 1000 1000 0 -insert PT_TOPO 1.6727,2.4498,-20.0000 1000 1000 0 -insert PT_TOPO 1.7406,0.4328,10.0000 1000 1000 0 -insert PT_TOPO 2.7666,0.6297,10.0000 1000 1000 0  

AARi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...