Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am building a model with Ilogic. This is my first project where I use Ilogic. Now I get stuck on the following.
I have a number of views. I want to put this in a fixed place in the drawing. I manage to move the views. But if I adjust the length of the product, it no longer works. I will explain my problem with 1 view.
I use the following code:
Dim oView As DrawingView = Nothing Dim oBasePosition As Point2d = Nothing Dim oDrawingViews As DrawingViews = ThisApplication.ActiveDocument.Sheets.Item(1).DrawingViews Dim XPos As String Dim YPos As String Dim XBasepunt As Double Dim YBasepunt As Double Dim Schaal As Double ' Where to place the product (in mm) XBasepunt = 0 YBasepunt = 0 '--------placing view 1----------------- ' Define drawing view oView = oDrawingViews.Item(1) ' Schaal van het base view Schaal = oView.Scale ' Values for X and Y positions XPos = XBasepunt * Schaal YPos = YBasepunt * Schaal ' Correct units XPos /= 10 YPos /= 10 ' Create a new point to move the baseview to. oBasePosition = ThisApplication.TransientGeometry.CreatePoint2d() oBasePosition.X = XPos + (oView.Width/2) oBasePosition.Y = YPos + (oView.Height/2) 'Move the baseview to the new position oView.Position = oBasePosition '---------------------------------------
The problem is only in the height. In the photo you can see what happens if i change the height and run the rule. I didn't change the scale:
I cannot explain why this is the result. The goal is that, regardless of the height, the product would stand in the corner. Does anyone know where it goes wrong?
I look forward to your responses. 🙂
Solved! Go to Solution.