Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing image heigh with journal?

Status
Not open for further replies.

aluminum2

Aerospace
Joined
Apr 27, 2010
Messages
218
Location
US

I am trying to resize an image I am inserting with a journal. The image part works. I added code to resize it and when I run it I get an error saying it is converting string to integer . I am not sure If I am using the SetImageWidth and SetImageheight correctly.




Code:
             Dim imageFile As String = "location" 
             Dim sheetTag As Tag = NXOpen.Tag.Null  
             Dim imageCoordinates(2) As Double  
             Dim imageheight As Double
             Dim imageWidth As Double
             imageCoordinates(0) = NAMEX  
             imageCoordinates(1) = NAMEY  
             imageCoordinates(2) = 0  
             imageheight = .1000
             imageWidth = .2000
             Dim imageTag As Tag = NXOpen.Tag.Null  
             ufs.Drf.CreateImageFromFile(imageFile, sheetTag, imageCoordinates, imageTag)  
             ufs.Drf.SetImageHeight(imageFile, imageheight)
             ufs.Drf.SetImageWidth(imageFile, imageWidth)
 
The SetImageHeight/Width functions take 2 input parameters: the image tag (an integer value), and the height/width (a double value). The image tag has been returned from the CreateImageFromFile function, change the following lines to use it.

Code:
ufs.Drf.SetImageHeight(imageTag, imageheight)
ufs.Drf.SetImageWidth(imageTag, imageWidth)

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top