Create 1:1 of 2D drawings

Create 1:1 of 2D drawings

Anonymous
Not applicable
321 Views
5 Replies
Message 1 of 6

Create 1:1 of 2D drawings

Anonymous
Not applicable

 

Would it be possible to create a rule, that would create a 1:1 dwg of my drawing and save in my folder (in the 2D environment)?

 

We use dwg in Inventor and not idw and sometimes we get asked for a 1:1 dwg and I thought it would be nice if we could have a rule that would do that. Most of the stuff we put on our drawings, is usually 1:50 of 1:100

 

When saving the file, it would have to include a custom subfix, so that it dosen't overwrite the original

0 Likes
322 Views
5 Replies
Replies (5)
Message 2 of 6

Sergio.D.Suárez
Mentor
Mentor

To scale the drawing as you would like, you could export the drawing as dwg then import it into a new inventor drawing file and see if it is possible to scale it to the scale you want. But in this way there will be no link with the parties of origin, and this will give erroneous results if in an eventual case you use a different scale.
I think it would be safest to place a 1: 1 scale on all views.
Then you should rearrange the views and also control the types of sheets, or remove Titlebloscks and borders.
Here is a code that will change all your views to a 1: 1 scale. You can also change the representation of the type of view with this code.

	Dim oDoc As DrawingDocument = ThisDoc.Document
	For Each oSheet As Sheet In oDoc.Sheets
		For Each oView As DrawingView In oSheet.DrawingViews
			On Error Resume next
			oView.Scale =1
			'oView.ViewStyle = DrawingViewStyleEnum.kShadedDrawingViewStyle
			'oView.DisplayTangentEdges = True
		Next
	Next

Note that there is an instruction "on error resume next". This instruction is to skip those views that are blocked by having the same scale as your parent view, so just change the scale in the parent view and this view ignore it, and it will be updated correctly.

I hope this helps. regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 3 of 6

Anonymous
Not applicable

thanks

 

Would it be possible to hide the title block and border when I run the rule?

0 Likes
Message 4 of 6

Sergio.D.Suárez
Mentor
Mentor

With this rule apart, you could hide or make visible your borders and titleblocks. Executing it again and again.
I have left it apart from the previous rule, because surely you need to rearrange your views before.
Then you can execute this rule to hide the titleblocks and borders.
Then you export to dwg with your settings and your custom file name.
Finally, you run the rule again to see the titleblocks and borders.
I hope this helps. regards

 

Dim doc = ThisDoc.Document
Dim oValue As Boolean = True
For Each oLayer As Layer In doc.StylesManager.Layers
	If InStr(oLayer.Name, "Border") <> 0 Then 
		If oLayer.Visible = oValue Then 
			oValue = False
			Exit For
		End If
	End If
Next

For Each oLayer As Layer In doc.StylesManager.Layers
	If InStr(oLayer.Name, "Border") <> 0 Then oLayer.Visible = oValue
	If InStr(oLayer.Name, "Title") <> 0 Then oLayer.Visible = oValue
Next

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 5 of 6

Anonymous
Not applicable

Thanks - I like idea of reverting back when you run the rule again

 

Could you combine the two rules in 1 code, so that when I run the rule the first time it...

 

Upscales everything to 1:1 AND hides Border and Title block

 

And when I run the rule again it...

 

Downscales to the original scale AND turns on Border and Title block again (like an undo function) 

0 Likes
Message 6 of 6

machiel.veldkamp
Collaborator
Collaborator

In that case you are better off making a copy of the 1:1 drawing and keeping the original intact.

 

Right?

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

___________________________
0 Likes