Ilogic rule to change surface body properties line types

Ilogic rule to change surface body properties line types

Anonymous
Not applicable
2,470 Views
11 Replies
Message 1 of 12

Ilogic rule to change surface body properties line types

Anonymous
Not applicable

HI all..

 

I have a lot of multi bodies parts that, I have a sweeped surface bodies, where I in IDW use surface bodies as centerline. I want to make a ilogic rule to change this suface bodies lines properties in IDW as default. That mean, when I make a view the surface bodies properties should change to centerline line types. thanks in advance.

RG

MDN

 

0 Likes
Accepted solutions (2)
2,471 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable
Accepted solution

Hi all,

 

Is this task really impossible?  I need some helps here..

0 Likes
Message 3 of 12

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Can you please provide to sample part (multiple bodies) to test and manual steps to change line types of surface bodies in IDW? please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 12

Anonymous
Not applicable

Hi,

 

Hereby attached some examples. 

It's would be nice, if is possible to make surface bodies as default change the properties to centerline.

Thanks in advance.

RG

MD

0 Likes
Message 5 of 12

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

As center lines are derived from surface body,  it is appeared as Edge object in drawing. All edge geometry in drawing can be used to change the line type.

 

Try below iLogic code to change line type.

 

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim oView As DrawingView
oView = oSheet.DrawingViews.Item(1)

Dim oCurve As DrawingCurve
For Each oCurve In oView.DrawingCurves
	If oCurve.ModelGeometry.Type = ObjectTypeEnum.kEdgeObject Then
	    oCurve.LineType = LineTypeEnum.kChainLineType 
	    oCurve.LineWeight = 0.018
	End If
Next

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 6 of 12

Anonymous
Not applicable

Hi 

 

Thanks you for your reply. 

Now I have added the ilogic rule i the idw. 

I changed the view with new pipes with surface bordies and run the rule, nothing happening, See Pic.

Is there something I missing?

RG

MD

0 Likes
Message 7 of 12

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

iLogic code is working for previously attached drawing. To demonstrate this, screencast video is prepared and uploaded to below link.

 

https://autode.sk/2QRL1Xd

 

To test the same, can you please provide drawing document? please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 8 of 12

Anonymous
Not applicable

Hi 

 

Thanks for the video.

I have tested with the same IDW I posted to you, it works also fine with the same view. But it do not works, If you just places a new view, example the same test pipe in to a new view and run the rule, and the line do not change. How come? 

 

* The difference with the IDW I posted with the IDW I working on is instead of the IPT, I places the view with the pipes IAM. with representation view. see PIC. Maybe a Little modification in rule will work. 

again thanks in advance.

RG

MD

0 Likes
Message 9 of 12

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Hoping that below iLogic code may be helpful.

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim oView As DrawingView
oView = oSheet.DrawingViews.Item(1)

Dim oCurve As DrawingCurve
For Each oCurve In oView.DrawingCurves
	If oCurve.ModelGeometry.Type = ObjectTypeEnum.kEdgeObject Or oCurve.ModelGeometry.Type = ObjectTypeEnum.kEdgeProxyObject Then
	    oCurve.LineType = LineTypeEnum.kChainLineType 
	    oCurve.LineWeight = 0.018
	End If
Next

Otherwise, please provide IDW with assembly file to test. Please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 10 of 12

Anonymous
Not applicable

Hi 

 

Thanks you..

I'm so happy that works now on IDW's I'm working on. But only the first view change the line type, on other views if I change the representation view and run the rule not thing change.

I try to copy the first view and so change the pipe with no success. I hope you have a solution for that. We are close..

only the view (marked) works not the rest of views see PIC.

RG

MD

 

0 Likes
Message 11 of 12

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@Anonymous,

 

Try this,

 

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim oView As DrawingView
For Each oView In oSheet.DrawingViews 
	Dim oCurve As DrawingCurve
	For Each oCurve In oView.DrawingCurves
		If oCurve.ModelGeometry.Type = ObjectTypeEnum.kEdgeObject Or oCurve.ModelGeometry.Type = ObjectTypeEnum.kEdgeProxyObject Then
		    oCurve.LineType = LineTypeEnum.kChainLineType 
		    oCurve.LineWeight = 0.018
		End If
	Next
Next 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 12 of 12

Anonymous
Not applicable

Hi,

 

Many thanks you for your helps, It's working perfect now.

My task now is trying to understand what the codes stand for..Smiley Very Happy

RG

MD

 

0 Likes