Define a new point in a script
Is there a way to define a point in the script without loading a text file? Or even if some initial points are loaded, is there a way to define subsequent points based on them? For example:
Code:
var PF1 = agb.FPoint(agc.FPointConstruction, agc.FPointCoordinateFile); //Creates basic feature |
Hi NC,
You can define your Point coordinate directly in the script just like you do in your coordinate file Code:
p.c11= Point(0.446215,0.073264); Hope it helps Cheers KAPI |
Thanks, Kapi, but that doesn't work for me. Depending on the variable I use (left of the equality sign), I either get "'p' is not defined" or "object is expected." Any thoughts?
Can the Point() function really be used as is without any object prefix (like "agb")? And why is the coordinate (x,y) instead of (x,y,z)? If I can define a point in the script, then translation should be straightforward the GetPointZ() method and the like. |
Hi NC,
This is How "P" is defined. Code:
function planeSketchesOnly6 (p) Code:
p.Ln28= Line(0.96724,0.5359512,0.96724,1.075531); Also can I suggest you to go thru Scripting Guide, you will find lot of your answers there and in Help Section. Hope it helps Cheers KAPI |
Many thanks. That gives me something to work with.
By "Scripting Guide," do you mean the section under Workbench help? I scanned that quickly but it doesn't seem to pertain to DM specifically. So instead, I've been reading "Scripting API" in DM's manual, which is more specific but doesn't answer all of my questions. |
Hi NC,
"Scripting Guide" will help you understand the flow of how scripts are used. "Scripting API" or DM user's guide will help you create Geometry specifically. So you need to go thru both to understand the overall process. Good Luck Cheers KAPI |
All times are GMT -4. The time now is 00:32. |