Reply

How to edit the Block Occurrence scale & Angle ?

Hi All,

 

I am working with BlockOccurence (SolidEdgeDraft.BlockOccurrence)object in Solid Edge Draft. This object is having properties "ScaleFactor" and "RotationAngle" as Read only properties.

Whereas it is also having public methods as "Scale" and "Rotate" ; results when using these 2 methods are different than expected. The Block occurence is getting scaled with this factor and it is not changing the Block scale(Editing the Block scale).  

 

Please let me know how to use these methods/Properties to edit the Block occurence scale and Angle ?

 

Regards,

OnkarP 

3 REPLIES

Re: How to edit the Block Occurrence scale & Angle ?

Hi SEWarrier12,

I don't understand what is not changed in your case.

I tried methods Scale and Rotate of some BlockOccurrences with success. The Draft geometry changed as expected and the properties return the changed values.

regards

JB
VS2015, SE ST10

Re: How to edit the Block Occurrence scale & Angle ?

Hi JB,

The methods are working but differently. 

 

I will explain now :

1. If I want Block scale as 0.001 then while adding Block occurence ; I will pass this value and it will add Block occurence with the provided scale.

 

2. Now If I want to modify the scale of Block occurence from 0.001 to 1. I can't directly use the "Scale" method by providing value as "1" for block occurence.  I need to get the factor and use the factor to scale the Block occurence. 

Is that correct ?

 

Similarly for rotation angle also.

 

My concern is that why I need to get the factor for  scaling the Block occurence. Is there any other Method/Property to do this without doing any special calculation. 

 

Reagards,

Onkarp

Re: How to edit the Block Occurrence scale & Angle ?

Hi Onkarp,
now I understand...
I fear there is no other way: method Scale() will scale the block occurrence, no way to set the factor directly. So you have to read the current ScaleFactor and calculate the scale to use. Same for rotation angle.
regards

JB
VS2015, SE ST10