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!

How to use NXOpen.BlockStyler.PropertyList.GetPoint()?

Status
Not open for further replies.

fatdogs81

Mechanical
Joined
Sep 22, 2014
Messages
22
Location
KR
Hi, I downloaded a sample code at siemenes.com.

[Download sample code]

Runned but a error was appeared.

----Error Message----
NXOpen.NXException: Invalid property name for the block. See syslog for details
NXOpen.BlockStyler.PropertyList.GetPoint(String propertyName)
idsymbol.apply_cb() file c:\Tempugs\NXJournals94304\journal.vb: line 332[/highlight]




Here is apply_cb callback.
'------------------------------------------------------------------------------
'Callback Name: apply_cb
'------------------------------------------------------------------------------
Public Function apply_cb() As Integer
Dim errorCode As Integer = 0
Try

'---- Enter your callback code here -----
Dim objects As TaggedObject() = selection0.GetProperties.GetTaggedObjectVector("SelectedObjects")
Dim cursor As Point3d = selection0.GetProperties.GetPoint("PickPoint") <- line: 332
Dim screen_pos As Point3d = cursorLocation0.GetProperties.GetPoint("CursorLocation")
Dim view1 As DraftingView = Nothing
Dim obj_coords As Point3d = Nothing

view1 = CType(workPart.DraftingViews.FindObject(vwname), Drawings.DraftingView)
obj_coords = get_position_on_object(objects(0), view1, cursor)

create_idsymbol(objects(0), obj_coords, screen_pos, view1, nr)
nr = nr + 1

Catch ex As Exception

'---- Enter your exception handling code here -----
errorCode = 1
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString)
End Try
apply_cb = errorCode
End Function




So I printed PropertyNames of 'objects' as below but 'PickPoint' was not found.

BlockID
Show
Enable
Group
Expanded
StepStatus
Cue
SelectMode
Bitmap
SelectionFilter
PointOverlay
SnapPointTypesEnabled
SnapPointTypesOnByDefault
MaximumScope
LabelString
ToolTip
CreateInterpartLink
InterpartSelection
AutomaticProgression
SelectedObjects
BlendVirtualCurveOverlay



I wonder 'PickPoint' is not available in NX 7.5?

If it is now avalable, how to get a point?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top